lkml.org 
[lkml]   [2013]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 1/6] kernel: implement queue spinlock API
From
Date
On Thu, 2013-02-07 at 15:58 -0800, Michel Lespinasse wrote:

> No, I think that's doable. The trick would be that once a thread
> acquires the lock, the only remaining use of the node is to receive
> the 'next' pointer if/when another thread starts contending for the
> lock. So if the lock state would need to distinguish between a lock
> that is currently locked but not contended (the next value would then
> be NULL), and a lock that is currently locked and contended (the
> lock->next value is the node that goes after the current lock owner)
>

It adds yet another memory write to store the node pointer in the
lock...

I suspect it's going to increase false sharing.




\
 
 \ /
  Last update: 2013-02-08 01:41    [W:0.056 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site