lkml.org 
[lkml]   [2016]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 0/3] restartable sequences v2: fast user-space percpu critical sections
On Apr 8, 2016 4:04 AM, "Peter Zijlstra" <peterz@infradead.org> wrote:
>
> On Thu, Apr 07, 2016 at 03:05:26PM -0700, Andy Lutomirski wrote:
>
> > It doesn't, which is what I like about my variant. If the thread
> > accesses the protected data structure, though, it should bump the
> > sequence count, which will cause the first thread to about when it
> > gets scheduled in.
>
> Nope it won't, because that first thread is right at the commit
> instruction, nothing will stop it from executing that store and clobbing
> what we just wrote.
>

I don't think so. I write an event number. You commit because you
didn't notice. I haven't loaded yet from the value you wrote when you
committed, so nothing goes wrong.

--Andy

\
 
 \ /
  Last update: 2016-04-08 18:21    [W:0.071 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site