Re: [PATCH 4/4] locking/qrwlock: Use direct MCS lock/unlock in slowpath

2015-07-07 Thread Peter Zijlstra
On Tue, Jul 07, 2015 at 05:59:59PM -0400, Waiman Long wrote: > On 07/07/2015 07:24 AM, Peter Zijlstra wrote: > >On Mon, Jul 06, 2015 at 11:43:06AM -0400, Waiman Long wrote: > >>Lock waiting in the qrwlock uses the spinlock (qspinlock for x86) > >>as the waiting queue. This is slower than using MCS

Re: [PATCH 4/4] locking/qrwlock: Use direct MCS lock/unlock in slowpath

2015-07-07 Thread Waiman Long
On 07/07/2015 07:24 AM, Peter Zijlstra wrote: On Mon, Jul 06, 2015 at 11:43:06AM -0400, Waiman Long wrote: Lock waiting in the qrwlock uses the spinlock (qspinlock for x86) as the waiting queue. This is slower than using MCS lock directly because of the extra level of indirection causing more at

Re: [PATCH 4/4] locking/qrwlock: Use direct MCS lock/unlock in slowpath

2015-07-07 Thread Peter Zijlstra
On Mon, Jul 06, 2015 at 11:43:06AM -0400, Waiman Long wrote: > Lock waiting in the qrwlock uses the spinlock (qspinlock for x86) > as the waiting queue. This is slower than using MCS lock directly > because of the extra level of indirection causing more atomics to > be used as well as 2 waiting thr

[PATCH 4/4] locking/qrwlock: Use direct MCS lock/unlock in slowpath

2015-07-06 Thread Waiman Long
Lock waiting in the qrwlock uses the spinlock (qspinlock for x86) as the waiting queue. This is slower than using MCS lock directly because of the extra level of indirection causing more atomics to be used as well as 2 waiting threads spinning on the lock cacheline instead of only one. This patch