On 16.12.2016 21:00, Peter Zijlstra wrote:
On Fri, Dec 16, 2016 at 07:11:41PM +0100, Nicolai Hähnle wrote:
mutex_optimistic_spin() already calls __mutex_trylock, and for the no-spin
case, __mutex_unlock_slowpath() only calls wake_up_q() after releasing the
wait_lock.
mutex_optimistic_spin() is
On Fri, Dec 16, 2016 at 07:11:41PM +0100, Nicolai Hähnle wrote:
> mutex_optimistic_spin() already calls __mutex_trylock, and for the no-spin
> case, __mutex_unlock_slowpath() only calls wake_up_q() after releasing the
> wait_lock.
mutex_optimistic_spin() is a no-op when !CONFIG_MUTEX_SPIN_ON_OWNER
On 16.12.2016 18:20, Peter Zijlstra wrote:
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote:
@@ -716,7 +775,20 @@ __mutex_lock_common(struct mutex *lock, long state,
unsigned int subclass,
spin_unlock_mutex(&lock->wait_lock, flags);
schedule_preem
On 16.12.2016 18:15, Peter Zijlstra wrote:
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote:
The concern about picking up a handoff that we didn't request is real,
though it cannot happen in the first iteration. Perhaps this __mutex_trylock
can be moved to the end of the loop? See
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote:
> >>@@ -716,7 +775,20 @@ __mutex_lock_common(struct mutex *lock, long state,
> >>unsigned int subclass,
> >>spin_unlock_mutex(&lock->wait_lock, flags);
> >>schedule_preempt_disabled();
> >>
> >>- if (
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote:
> The concern about picking up a handoff that we didn't request is real,
> though it cannot happen in the first iteration. Perhaps this __mutex_trylock
> can be moved to the end of the loop? See below...
> >>@@ -728,7 +800,7 @@ __mut
On Fri, Dec 16, 2016 at 03:19:43PM +0100, Nicolai Hähnle wrote:
> Hi Peter and Chris,
>
> (trying to combine the handoff discussion here)
>
> On 06.12.2016 17:55, Peter Zijlstra wrote:
> >On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
> >>@@ -693,8 +748,12 @@ __mutex_lock_common(
On 01.12.2016 16:59, Chris Wilson wrote:
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
@@ -677,15 +722,25 @@ __mutex_lock_common(struct mutex *lock, long state,
unsigned int subclass,
debug_mutex_lock_common(lock, &waiter);
debug_mutex_add_waiter(lock, &waiter,
Hi Peter and Chris,
(trying to combine the handoff discussion here)
On 06.12.2016 17:55, Peter Zijlstra wrote:
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
@@ -693,8 +748,12 @@ __mutex_lock_common(struct mutex *lock, long state,
unsigned int subclass,
* mut
On 06.12.2016 16:36, Peter Zijlstra wrote:
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
+static inline int __sched
+__ww_mutex_add_waiter(struct mutex_waiter *waiter,
+ struct mutex *lock,
+ struct ww_acquire_ctx *ww_ctx)
+{
+ stru
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
> @@ -693,8 +748,12 @@ __mutex_lock_common(struct mutex *lock, long state,
> unsigned int subclass,
>* mutex_unlock() handing the lock off to us, do a trylock
>* before testing the error conditions to m
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
> +static inline int __sched
> +__ww_mutex_add_waiter(struct mutex_waiter *waiter,
> + struct mutex *lock,
> + struct ww_acquire_ctx *ww_ctx)
> +{
> + struct mutex_waiter *cur;
> +
> + if (!w
On Thu, Dec 01, 2016 at 03:06:48PM +0100, Nicolai Hähnle wrote:
> @@ -677,15 +722,25 @@ __mutex_lock_common(struct mutex *lock, long state,
> unsigned int subclass,
> debug_mutex_lock_common(lock, &waiter);
> debug_mutex_add_waiter(lock, &waiter, task);
>
> - /* add waiting tasks
13 matches
Mail list logo