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

2014-09-16 Thread Jason Low
On Tue, 2014-09-16 at 16:08 -0400, Peter Hurley wrote: > Hi Jason, > > On 09/16/2014 03:01 PM, 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. > > > > H

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

2014-09-16 Thread Tim Chen
On Tue, 2014-09-16 at 16:08 -0400, Peter Hurley wrote: > Hi Jason, > > On 09/16/2014 03:01 PM, 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. > > > > H

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

2014-09-16 Thread Peter Hurley
Hi Jason, On 09/16/2014 03:01 PM, 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. > > However, a subsequent patch was added such that we directly check for >

[PATCH v2] 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