Re: [PATCH] locking/rwlocks: clean up of qrwlock

2015-01-06 Thread Baoquan He
On 01/06/15 at 11:13am, Peter Zijlstra wrote: > On Tue, Jan 06, 2015 at 05:25:42PM +0800, Baoquan He wrote: > > Hi all, > > > > Thanks for reviewing. > > > > Do you have any other concerns about this small change? > > I just don't see any point in making the code worse for the 1 arch that > act

Re: [PATCH] locking/rwlocks: clean up of qrwlock

2015-01-06 Thread Peter Zijlstra
On Tue, Jan 06, 2015 at 05:25:42PM +0800, Baoquan He wrote: > Hi all, > > Thanks for reviewing. > > Do you have any other concerns about this small change? I just don't see any point in making the code worse for the 1 arch that actually uses it. If there were other archs using it and for them t

Re: [PATCH] locking/rwlocks: clean up of qrwlock

2015-01-06 Thread Baoquan He
Hi all, Thanks for reviewing. Do you have any other concerns about this small change? Thanks Baoquan On 12/17/14 at 04:16pm, Waiman Long wrote: > On 12/16/2014 10:36 AM, Baoquan He wrote: > >On 12/16/14 at 10:01am, Peter Zijlstra wrote: > >>On Tue, Dec 16, 2014 at 02:00:40PM +0800, Baoquan He

Re: [PATCH] locking/rwlocks: clean up of qrwlock

2014-12-17 Thread Waiman Long
On 12/16/2014 10:36 AM, Baoquan He wrote: On 12/16/14 at 10:01am, Peter Zijlstra wrote: On Tue, Dec 16, 2014 at 02:00:40PM +0800, Baoquan He wrote: In queue_read_lock_slowpath, when writer count becomes 0, we need increment the read count and get the lock. Then need call rspin_until_writer_unlo

Re: [PATCH] locking/rwlocks: clean up of qrwlock

2014-12-16 Thread Baoquan He
On 12/16/14 at 10:01am, Peter Zijlstra wrote: > On Tue, Dec 16, 2014 at 02:00:40PM +0800, Baoquan He wrote: > > In queue_read_lock_slowpath, when writer count becomes 0, we need > > increment the read count and get the lock. Then need call > > rspin_until_writer_unlock to check again if an incoming

Re: [PATCH] locking/rwlocks: clean up of qrwlock

2014-12-16 Thread Peter Zijlstra
On Tue, Dec 16, 2014 at 02:00:40PM +0800, Baoquan He wrote: > In queue_read_lock_slowpath, when writer count becomes 0, we need > increment the read count and get the lock. Then need call > rspin_until_writer_unlock to check again if an incoming writer > steals the lock in the gap. But in rspin_unt

[PATCH] locking/rwlocks: clean up of qrwlock

2014-12-15 Thread Baoquan He
In queue_read_lock_slowpath, when writer count becomes 0, we need increment the read count and get the lock. Then need call rspin_until_writer_unlock to check again if an incoming writer steals the lock in the gap. But in rspin_until_writer_unlock it only checks the writer count, namely low 8 bit o