lkml.org 
[lkml]   [2018]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire
    On Thu, Jul 12, 2018 at 09:52:42PM +0200, Andrea Parri wrote:
    > On Thu, Jul 12, 2018 at 11:10:58AM -0700, Linus Torvalds wrote:
    > > On Thu, Jul 12, 2018 at 11:05 AM Peter Zijlstra <peterz@infradead.org> wrote:
    > > >
    > > > The locking pattern is fairly simple and shows where RCpc comes apart
    > > > from expectation real nice.
    > >
    > > So who does RCpc right now for the unlock-lock sequence? Somebody
    > > mentioned powerpc. Anybody else?
    >
    > powerpc have RCtso (and RCpc) but not RCsc unlock-lock, according to the
    > following indeed original terminology:
    >
    > - RCsc unlock-lock MUST ORDER:
    >
    > a) the WRITE and the READ below:
    >
    > WRITE x=1
    > UNLOCK s
    > LOCK s
    > READ y
    >
    > as in a store-buffering test;
    >
    > b) the two WRITEs below:
    >
    > WRITE x=1
    > UNLOCK s
    > LOCK s
    > WRITE y=1
    >
    > as in a message-passing test;
    >
    > c) the two READs below:
    >
    > READ x
    > UNLOCK s
    > LOCK s
    > READ y
    >
    > as in a message-passing test;
    >
    > d) the READ and the WRITE below:
    >
    > READ x
    > UNLOCK s
    > LOCK s
    > WRITE y
    >
    > as in a load-buffering test;
    >
    > - RCtso unlock-lock MUST ORDER b), c), d) above.
    >
    > - RCpc unlock-lock MUST ORDER none of the above.
    >
    > AFAICT, all arch _in_ the current implementation have RCtso unlock-lock.
    >
    >
    > >
    > > How nasty would be be to make powerpc conform? I will always advocate
    > > tighter locking and ordering rules over looser ones..
    >
    > A simple answer is right above (place a sync somewhere in the sequence);
    > for benchmark results, I must defer...

    Sorry, not sure why but I did intend "conform to RCsc" here.


    >
    > Andrea
    >
    >
    > >
    > > Linus
    \
     
     \ /
      Last update: 2018-07-15 22:06    [W:4.205 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site