Re: [PATCH -v4 8/8] locking/mutex: Enable optimistic spinning of woken waiter

2016-10-18 Thread Peter Zijlstra
On Mon, Oct 17, 2016 at 07:21:28PM -0400, Waiman Long wrote: > On 10/07/2016 10:52 AM, Peter Zijlstra wrote: > >@@ -600,7 +630,7 @@ __mutex_lock_common(struct mutex *lock, > > mutex_acquire_nest(&lock->dep_map, subclass, 0, nest_lock, ip); > > > > if (__mutex_trylock(lock, false) || > >-

Re: [PATCH -v4 8/8] locking/mutex: Enable optimistic spinning of woken waiter

2016-10-17 Thread Waiman Long
On 10/07/2016 10:52 AM, Peter Zijlstra wrote: @@ -600,7 +630,7 @@ __mutex_lock_common(struct mutex *lock, mutex_acquire_nest(&lock->dep_map, subclass, 0, nest_lock, ip); if (__mutex_trylock(lock, false) || - mutex_optimistic_spin(lock, ww_ctx, use_ww_ctx)) { +

Re: [PATCH -v4 8/8] locking/mutex: Enable optimistic spinning of woken waiter

2016-10-17 Thread Peter Zijlstra
On Thu, Oct 13, 2016 at 04:28:01PM +0100, Will Deacon wrote: > On Fri, Oct 07, 2016 at 04:52:51PM +0200, Peter Zijlstra wrote: > > @@ -457,15 +472,20 @@ static bool mutex_optimistic_spin(struct > > * release the lock or go to sleep. > > */ > > owner = __mutex_

Re: [PATCH -v4 8/8] locking/mutex: Enable optimistic spinning of woken waiter

2016-10-13 Thread Will Deacon
On Fri, Oct 07, 2016 at 04:52:51PM +0200, Peter Zijlstra wrote: > From: Waiman Long > > This patch makes the waiter that sets the HANDOFF flag start spinning > instead of sleeping until the handoff is complete or the owner > sleeps. Otherwise, the handoff will cause the optimistic spinners to > a

[PATCH -v4 8/8] locking/mutex: Enable optimistic spinning of woken waiter

2016-10-07 Thread Peter Zijlstra
From: Waiman Long This patch makes the waiter that sets the HANDOFF flag start spinning instead of sleeping until the handoff is complete or the owner sleeps. Otherwise, the handoff will cause the optimistic spinners to abort spinning as the handed-off owner may not be running. Cc: Ingo Molnar