Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Waiman Long
On 11/07/2017 02:41 PM, Peter Zijlstra wrote: > On Tue, Nov 07, 2017 at 11:39:02AM -0500, Waiman Long wrote: >> On 11/07/2017 07:58 AM, Peter Zijlstra wrote: >>> On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: This patch combines the best attributes of an unfair lock and a

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Waiman Long
On 11/07/2017 02:41 PM, Peter Zijlstra wrote: > On Tue, Nov 07, 2017 at 11:39:02AM -0500, Waiman Long wrote: >> On 11/07/2017 07:58 AM, Peter Zijlstra wrote: >>> On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: This patch combines the best attributes of an unfair lock and a

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Peter Zijlstra
On Tue, Nov 07, 2017 at 11:39:02AM -0500, Waiman Long wrote: > On 11/07/2017 07:58 AM, Peter Zijlstra wrote: > > On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: > >> This patch combines the best attributes of an unfair lock and a > >> pvqspinlock into a hybrid lock with 2 modes -

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Peter Zijlstra
On Tue, Nov 07, 2017 at 11:39:02AM -0500, Waiman Long wrote: > On 11/07/2017 07:58 AM, Peter Zijlstra wrote: > > On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: > >> This patch combines the best attributes of an unfair lock and a > >> pvqspinlock into a hybrid lock with 2 modes -

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Waiman Long
On 11/07/2017 07:58 AM, Peter Zijlstra wrote: > On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: >> Currently, all the lock waiters entering the slowpath will do one >> lock stealing attempt to acquire the lock. That helps performance, >> especially in VMs with over-committed vCPUs.

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Waiman Long
On 11/07/2017 07:58 AM, Peter Zijlstra wrote: > On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: >> Currently, all the lock waiters entering the slowpath will do one >> lock stealing attempt to acquire the lock. That helps performance, >> especially in VMs with over-committed vCPUs.

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Peter Zijlstra
On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Peter Zijlstra
On Fri, Nov 03, 2017 at 11:35:31AM -0400, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Paolo Bonzini
On 03/11/2017 16:35, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't perform as good as unfair

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Paolo Bonzini
On 03/11/2017 16:35, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't perform as good as unfair

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Juergen Gross
On 03/11/17 16:35, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't perform as good as unfair

Re: [PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-07 Thread Juergen Gross
On 03/11/17 16:35, Waiman Long wrote: > Currently, all the lock waiters entering the slowpath will do one > lock stealing attempt to acquire the lock. That helps performance, > especially in VMs with over-committed vCPUs. However, the current > pvqspinlocks still don't perform as good as unfair

[PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-03 Thread Waiman Long
Currently, all the lock waiters entering the slowpath will do one lock stealing attempt to acquire the lock. That helps performance, especially in VMs with over-committed vCPUs. However, the current pvqspinlocks still don't perform as good as unfair locks in many cases. On the other hands, unfair

[PATCH] locking/pvqspinlock: Hybrid PV queued/unfair locks

2017-11-03 Thread Waiman Long
Currently, all the lock waiters entering the slowpath will do one lock stealing attempt to acquire the lock. That helps performance, especially in VMs with over-committed vCPUs. However, the current pvqspinlocks still don't perform as good as unfair locks in many cases. On the other hands, unfair