lkml.org 
[lkml]   [2023]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)
    > > Why do you want the implementation to forbid it?  The pattern of the 
    > > litmus test resembles 3+3W, and you don't care whether the kernel allows
    > > that pattern. Do you?
    >
    > Jonas asked a similar question, so I am answering you both here.
    >
    > With (say) a release-WRITE_ONCE() chain implementing N+2W for some
    > N, it is reasonably well known that you don't get ordering, hardware
    > support otwithstanding. After all, none of the Linux kernel, C, and C++
    > memory models make that guarantee. In addition, the non-RCU barriers
    > and accesses that you can use to create N+2W have been in very wide use
    > for a very long time.
    >
    > Although RCU has been in use for almost as long as those non-RCU barriers,
    > it has not been in wide use for anywhere near that long. So I cannot
    > be so confident in ruling out some N+2W use case for RCU.

    Did some archeology... the pattern, with either RCU sync plus a release
    or with two full fences plus a release, was forbidden by "ancient LKMM":
    the relevant changes were described in

    https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/LWNLinuxMM/WeakModel.html#Coherence%20Point%20and%20RCU

    Andrea

    \
     
     \ /
      Last update: 2023-03-26 23:55    [W:4.158 / U:0.456 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site