Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-14 Thread Waiman Long
On 02/13/2014 12:26 PM, Peter Zijlstra wrote: On Thu, Feb 13, 2014 at 05:35:46PM +0100, Peter Zijlstra wrote: On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-14 Thread Waiman Long
On 02/13/2014 11:35 AM, Peter Zijlstra wrote: On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-14 Thread Waiman Long
On 02/13/2014 11:35 AM, Peter Zijlstra wrote: On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-14 Thread Waiman Long
On 02/13/2014 12:26 PM, Peter Zijlstra wrote: On Thu, Feb 13, 2014 at 05:35:46PM +0100, Peter Zijlstra wrote: On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-13 Thread Peter Zijlstra
On Thu, Feb 13, 2014 at 05:35:46PM +0100, Peter Zijlstra wrote: > On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: > > Using the same locktest program to repetitively take a single rwlock with > > programmable number of threads and count their execution times. Each > > thread takes the

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-13 Thread Peter Zijlstra
On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: > Using the same locktest program to repetitively take a single rwlock with > programmable number of threads and count their execution times. Each > thread takes the lock 5M times on a 4-socket 40-core Westmere-EX > system. I bound all

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-13 Thread Peter Zijlstra
On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket 40-core Westmere-EX system. I bound all the

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-13 Thread Peter Zijlstra
On Thu, Feb 13, 2014 at 05:35:46PM +0100, Peter Zijlstra wrote: On Tue, Feb 11, 2014 at 03:12:59PM -0500, Waiman Long wrote: Using the same locktest program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-11 Thread Waiman Long
On 02/11/2014 01:17 PM, Waiman Long wrote: Peter, I had written a test program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket 40-core Westmere-EX system. I bound all the threads to

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-11 Thread Waiman Long
Peter, I had written a test program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket 40-core Westmere-EX system. I bound all the threads to different CPUs with the following 3

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-11 Thread Waiman Long
Peter, I had written a test program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket 40-core Westmere-EX system. I bound all the threads to different CPUs with the following 3

Re: [PATCH 7/8] locking: Introduce qrwlock

2014-02-11 Thread Waiman Long
On 02/11/2014 01:17 PM, Waiman Long wrote: Peter, I had written a test program to repetitively take a single rwlock with programmable number of threads and count their execution times. Each thread takes the lock 5M times on a 4-socket 40-core Westmere-EX system. I bound all the threads to

[PATCH 7/8] locking: Introduce qrwlock

2014-02-10 Thread Peter Zijlstra
This rwlock uses the arch_spin_lock_t as a waitqueue, and assuming the arch_spin_lock_t is a fair lock (ticket,mcs etc..) the resulting rwlock is a fair lock. It fits in the same 8 bytes as the regular rwlock_t by folding the reader and writer count into a single integer, using the remaining 4

[PATCH 7/8] locking: Introduce qrwlock

2014-02-10 Thread Peter Zijlstra
This rwlock uses the arch_spin_lock_t as a waitqueue, and assuming the arch_spin_lock_t is a fair lock (ticket,mcs etc..) the resulting rwlock is a fair lock. It fits in the same 8 bytes as the regular rwlock_t by folding the reader and writer count into a single integer, using the remaining 4