Re: sem_lock() vs qspinlocks
From: Peter Zijlstra
Date: Fri May 20 2016 - 03:50:09 EST
On Thu, May 19, 2016 at 10:39:26PM -0700, Davidlohr Bueso wrote:
> In addition, this makes me wonder if queued_spin_is_locked() should then be:
>
> - return atomic_read(&lock->val);
> + return atomic_read(&lock->val) & _Q_LOCKED_MASK;
>
> And avoid considering pending waiters as locked.
Probably