Re: [PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-21 Thread Waiman Long
On 01/20/2014 10:21 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:03PM -0500, Waiman Long wrote: +#ifndef arch_mutex_cpu_relax +# define arch_mutex_cpu_relax() cpu_relax() +#endif Include Will do so. +#ifndef smp_load_acquire +# ifdef CONFIG_X86 +# define smp_load_acquire(p)

Re: [PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-21 Thread Waiman Long
On 01/20/2014 10:21 AM, Peter Zijlstra wrote: On Tue, Jan 14, 2014 at 11:44:03PM -0500, Waiman Long wrote: +#ifndef arch_mutex_cpu_relax +# define arch_mutex_cpu_relax() cpu_relax() +#endif Includelinux/mutex.h Will do so. +#ifndef smp_load_acquire +# ifdef CONFIG_X86 +# define

Re: [PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-20 Thread Peter Zijlstra
On Tue, Jan 14, 2014 at 11:44:03PM -0500, Waiman Long wrote: > +#ifndef arch_mutex_cpu_relax > +# define arch_mutex_cpu_relax() cpu_relax() > +#endif Include > +#ifndef smp_load_acquire > +# ifdef CONFIG_X86 > +# define smp_load_acquire(p) \ > + ({

Re: [PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-20 Thread Peter Zijlstra
On Tue, Jan 14, 2014 at 11:44:03PM -0500, Waiman Long wrote: +#ifndef arch_mutex_cpu_relax +# define arch_mutex_cpu_relax() cpu_relax() +#endif Include linux/mutex.h +#ifndef smp_load_acquire +# ifdef CONFIG_X86 +# define smp_load_acquire(p) \ + ({

[PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-14 Thread Waiman Long
This patch introduces a new read/write lock implementation that put waiting readers and writers into a queue instead of actively contending the lock like the current read/write lock implementation. This will improve performance in highly contended situation by reducing the cache line bouncing

[PATCH v9 1/5] qrwlock: A queue read/write lock implementation

2014-01-14 Thread Waiman Long
This patch introduces a new read/write lock implementation that put waiting readers and writers into a queue instead of actively contending the lock like the current read/write lock implementation. This will improve performance in highly contended situation by reducing the cache line bouncing