Re: [PATCH v2 3/4] mutex: Try to acquire mutex only if it is unlocked

2014-06-12 Thread Jason Low
On Thu, 2014-06-12 at 12:37 -0700, Davidlohr Bueso wrote: > On Wed, 2014-06-11 at 11:37 -0700, Jason Low wrote: > > Upon entering the slowpath in __mutex_lock_common(), we try once more to > > acquire the mutex. We only try to acquire if (lock->count >= 0). However, > > what we actually want here i

Re: [PATCH v2 3/4] mutex: Try to acquire mutex only if it is unlocked

2014-06-12 Thread Davidlohr Bueso
On Wed, 2014-06-11 at 11:37 -0700, Jason Low wrote: > Upon entering the slowpath in __mutex_lock_common(), we try once more to > acquire the mutex. We only try to acquire if (lock->count >= 0). However, > what we actually want here is to try to acquire if the mutex is unlocked > (lock->count == 1).

Re: [PATCH v2 3/4] mutex: Try to acquire mutex only if it is unlocked

2014-06-11 Thread Long, Wai Man
On 6/11/2014 2:37 PM, Jason Low wrote: Upon entering the slowpath in __mutex_lock_common(), we try once more to acquire the mutex. We only try to acquire if (lock->count >= 0). However, what we actually want here is to try to acquire if the mutex is unlocked (lock->count == 1). This patch ch

[PATCH v2 3/4] mutex: Try to acquire mutex only if it is unlocked

2014-06-11 Thread Jason Low
Upon entering the slowpath in __mutex_lock_common(), we try once more to acquire the mutex. We only try to acquire if (lock->count >= 0). However, what we actually want here is to try to acquire if the mutex is unlocked (lock->count == 1). This patch changes it so that we only try-acquire the m