Re: [PATCH v3] locking/rwsem: Avoid double checking before try acquiring write lock

2014-09-17 Thread Jason Low
On Wed, 2014-09-17 at 11:34 +0200, Davidlohr Bueso wrote: > On Tue, 2014-09-16 at 17:16 -0700, Jason Low wrote: > > Commit 9b0fc9c09f1b checks for if there are known active lockers > > in order to avoid write trylocking using expensive cmpxchg() when > > it likely wouldn't get the lock. > > Ah, I

Re: [PATCH v3] locking/rwsem: Avoid double checking before try acquiring write lock

2014-09-17 Thread Davidlohr Bueso
On Tue, 2014-09-16 at 17:16 -0700, Jason Low wrote: > Commit 9b0fc9c09f1b checks for if there are known active lockers > in order to avoid write trylocking using expensive cmpxchg() when > it likely wouldn't get the lock. Ah, I remember you had this one in your queue for some time :) > However, a

[PATCH v3] locking/rwsem: Avoid double checking before try acquiring write lock

2014-09-16 Thread Jason Low
Commit 9b0fc9c09f1b checks for if there are known active lockers in order to avoid write trylocking using expensive cmpxchg() when it likely wouldn't get the lock. However, a subsequent patch was added such that we directly check for sem->count == RWSEM_WAITING_BIAS right before trying that cmpxch