Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-17 Thread Waiman Long
On 02/12/2017 09:24 PM, panxinhui wrote: > > 在 2017/2/10 上午4:53, Waiman Long 写道: >> On 02/07/2017 10:39 PM, Xinhui Pan wrote: >>> >>> 2016-12-26 4:26 GMT+08:00 Waiman Long >> >: >>> >>> A number of cmpxchg calls in qspinlock_paravirt.h were

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-17 Thread Waiman Long
On 02/12/2017 09:24 PM, panxinhui wrote: > > 在 2017/2/10 上午4:53, Waiman Long 写道: >> On 02/07/2017 10:39 PM, Xinhui Pan wrote: >>> >>> 2016-12-26 4:26 GMT+08:00 Waiman Long >> >: >>> >>> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >>>

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-12 Thread Boqun Feng
On Mon, Feb 13, 2017 at 10:24:38AM +0800, panxinhui wrote: > > > 在 2017/2/10 上午4:53, Waiman Long 写道: > > On 02/07/2017 10:39 PM, Xinhui Pan wrote: > >> > >> > >> 2016-12-26 4:26 GMT+08:00 Waiman Long >> >: > >> > >> A number of cmpxchg calls

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-12 Thread Boqun Feng
On Mon, Feb 13, 2017 at 10:24:38AM +0800, panxinhui wrote: > > > 在 2017/2/10 上午4:53, Waiman Long 写道: > > On 02/07/2017 10:39 PM, Xinhui Pan wrote: > >> > >> > >> 2016-12-26 4:26 GMT+08:00 Waiman Long >> >: > >> > >> A number of cmpxchg calls in

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-12 Thread panxinhui
在 2017/2/10 上午4:53, Waiman Long 写道: > On 02/07/2017 10:39 PM, Xinhui Pan wrote: >> >> >> 2016-12-26 4:26 GMT+08:00 Waiman Long > >: >> >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-12 Thread panxinhui
在 2017/2/10 上午4:53, Waiman Long 写道: > On 02/07/2017 10:39 PM, Xinhui Pan wrote: >> >> >> 2016-12-26 4:26 GMT+08:00 Waiman Long > >: >> >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 03:09:33PM +0800, Pan Xinhui wrote: > > > 在 2017/2/8 14:09, Boqun Feng 写道: > > On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: > > > On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > > > > 2016-12-26 4:26 GMT+08:00 Waiman Long :

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 03:09:33PM +0800, Pan Xinhui wrote: > > > 在 2017/2/8 14:09, Boqun Feng 写道: > > On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: > > > On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > > > > 2016-12-26 4:26 GMT+08:00 Waiman Long : > > > > > > > > >

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed versions to

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed versions to

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Pan Xinhui
在 2017/2/8 14:09, Boqun Feng 写道: On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: 2016-12-26 4:26 GMT+08:00 Waiman Long : A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed versions to

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: > On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > > 2016-12-26 4:26 GMT+08:00 Waiman Long : > > > > > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > > > relaxed versions to

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 12:05:40PM +0800, Boqun Feng wrote: > On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > > 2016-12-26 4:26 GMT+08:00 Waiman Long : > > > > > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > > > relaxed versions to improve performance on

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > 2016-12-26 4:26 GMT+08:00 Waiman Long : > > > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > > relaxed versions to improve performance on architectures that use LL/SC. > > > > All the

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-02-07 Thread Boqun Feng
On Wed, Feb 08, 2017 at 11:39:10AM +0800, Xinhui Pan wrote: > 2016-12-26 4:26 GMT+08:00 Waiman Long : > > > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > > relaxed versions to improve performance on architectures that use LL/SC. > > > > All the locking related

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Boqun Feng
On Thu, Jan 05, 2017 at 10:17:46AM -0500, Waiman Long wrote: > On 01/05/2017 03:16 AM, Pan Xinhui wrote: > > > > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: > >> On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > >>> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > On Sun, Dec 25,

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Boqun Feng
On Thu, Jan 05, 2017 at 10:17:46AM -0500, Waiman Long wrote: > On 01/05/2017 03:16 AM, Pan Xinhui wrote: > > > > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: > >> On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > >>> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > On Sun, Dec 25,

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Waiman Long
On 01/04/2017 04:41 AM, Peter Zijlstra wrote: > On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: >> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: >>> On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: A number of cmpxchg calls in qspinlock_paravirt.h were replaced by

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Waiman Long
On 01/04/2017 04:41 AM, Peter Zijlstra wrote: > On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: >> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: >>> On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: A number of cmpxchg calls in qspinlock_paravirt.h were replaced by

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Waiman Long
On 01/05/2017 03:16 AM, Pan Xinhui wrote: > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: >> On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: >>> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Waiman Long
On 01/05/2017 03:16 AM, Pan Xinhui wrote: > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: >> On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: >>> On 01/03/2017 11:18 AM, Peter Zijlstra wrote: On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Boqun Feng
On Thu, Jan 05, 2017 at 04:16:38PM +0800, Pan Xinhui wrote: > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: > > On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > > > On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > > > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > > > >

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Boqun Feng
On Thu, Jan 05, 2017 at 04:16:38PM +0800, Pan Xinhui wrote: > > > 在 2017/1/4 17:41, Peter Zijlstra 写道: > > On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > > > On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > > > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > > > >

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Peter Zijlstra
On Thu, Jan 05, 2017 at 04:16:38PM +0800, Pan Xinhui wrote: > I do some tests about cmpxchg and cmpxchg_acquire before on ppc. > > loops in 15s of each cmpxchg is below. > > cmpxchg_relaxed: 336663 > cmpxchg_release: 369054 > cmpxchg_acquire: 363364 > cmpxchg: 179435 > > so cmpxchg is

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Peter Zijlstra
On Thu, Jan 05, 2017 at 04:16:38PM +0800, Pan Xinhui wrote: > I do some tests about cmpxchg and cmpxchg_acquire before on ppc. > > loops in 15s of each cmpxchg is below. > > cmpxchg_relaxed: 336663 > cmpxchg_release: 369054 > cmpxchg_acquire: 363364 > cmpxchg: 179435 > > so cmpxchg is

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Pan Xinhui
在 2017/1/4 17:41, Peter Zijlstra 写道: On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: On 01/03/2017 11:18 AM, Peter Zijlstra wrote: On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-05 Thread Pan Xinhui
在 2017/1/4 17:41, Peter Zijlstra 写道: On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: On 01/03/2017 11:18 AM, Peter Zijlstra wrote: On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-04 Thread Peter Zijlstra
On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > >> relaxed versions to improve performance on

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-04 Thread Peter Zijlstra
On Tue, Jan 03, 2017 at 05:07:54PM -0500, Waiman Long wrote: > On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > >> relaxed versions to improve performance on

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Waiman Long
On 12/26/2016 12:50 AM, Boqun Feng wrote: > Hi Wainman, > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on architectures that use LL/SC. >> >> All the locking

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Waiman Long
On 12/26/2016 12:50 AM, Boqun Feng wrote: > Hi Wainman, > > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on architectures that use LL/SC. >> >> All the locking

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Waiman Long
On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on architectures that use LL/SC. > Claim without numbers ;-) Well it

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Waiman Long
On 01/03/2017 11:18 AM, Peter Zijlstra wrote: > On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: >> A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more >> relaxed versions to improve performance on architectures that use LL/SC. > Claim without numbers ;-) Well it

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Peter Zijlstra
On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > relaxed versions to improve performance on architectures that use LL/SC. Claim without numbers ;-) > > All the locking related cmpxchg's are replaced with the

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2017-01-03 Thread Peter Zijlstra
On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > relaxed versions to improve performance on architectures that use LL/SC. Claim without numbers ;-) > > All the locking related cmpxchg's are replaced with the

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2016-12-25 Thread Boqun Feng
Hi Wainman, On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > relaxed versions to improve performance on architectures that use LL/SC. > > All the locking related cmpxchg's are replaced with the _acquire >

Re: [PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2016-12-25 Thread Boqun Feng
Hi Wainman, On Sun, Dec 25, 2016 at 03:26:01PM -0500, Waiman Long wrote: > A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more > relaxed versions to improve performance on architectures that use LL/SC. > > All the locking related cmpxchg's are replaced with the _acquire >

[PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2016-12-25 Thread Waiman Long
A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed versions to improve performance on architectures that use LL/SC. All the locking related cmpxchg's are replaced with the _acquire variants: - pv_queued_spin_steal_lock() - trylock_clear_pending() The cmpxchg's

[PATCH v2] locking/pvqspinlock: Relax cmpxchg's to improve performance on some archs

2016-12-25 Thread Waiman Long
A number of cmpxchg calls in qspinlock_paravirt.h were replaced by more relaxed versions to improve performance on architectures that use LL/SC. All the locking related cmpxchg's are replaced with the _acquire variants: - pv_queued_spin_steal_lock() - trylock_clear_pending() The cmpxchg's