lkml.org 
[lkml]   [2013]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 1/6] kernel: implement queue spinlock API
From
On Thu, Feb 7, 2013 at 4:40 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
> On Thu, Feb 07, 2013 at 04:03:54PM -0800, Eric Dumazet wrote:
>> It adds yet another memory write to store the node pointer in the
>> lock...
>>
>> I suspect it's going to increase false sharing.
>
> On the other hand, compared to straight MCS, it reduces the need to
> pass the node address around. Furthermore, the node pointer is likely
> to be in the same cache line as the lock word itself, and finally
> some architectures can do a double-pointer store.
>
> Of course, it might well be slower, but it seems like it is worth
> giving it a try.

Right. Another nice point about this approach is that there needs to
be only one node per spinning CPU, so the node pointers (both tail and
next) might be replaced with CPU identifiers, which would bring the
spinlock size down to the same as with the ticket spinlock (which in
turns makes it that much more likely that we'll have atomic stores of
that size).

--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.


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