lkml.org 
[lkml]   [2016]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sem_lock() vs qspinlocks
On Fri, May 20, 2016 at 04:47:43PM -0400, Waiman Long wrote:

> >Similarly, and I know you hate it, but afaict, then semantically
> >queued_spin_is_contended() ought to be:
> >
> >- return atomic_read(&lock->val) & ~_Q_LOCKED_MASK;
> >+ return atomic_read(&lock->val);
> >

> Looking for contended lock, you need to consider the lock waiters also. So
> looking at the whole word is right.

No, you _only_ need to look at the lock waiters.

\
 
 \ /
  Last update: 2016-05-20 23:01    [W:0.233 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site