Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus test)

Alan Stern
2023-01-14T16:42:41Z

On Fri, Jan 13, 2023 at 02:55:34PM +0000, Jonas Oberhauser wrote:
> I think the whole rcu-order topic can be summarized as the 'one rule': "if a grace period happens before a rcsc-unlock, it must also happen before the rcsc -lock, and analogously if rcsc-lock happens before a grace period, the rcsc-unlock also happens before the grace period" .

There is more to it than that, as I mentioned earlier. A complete
description can be found the explanation.txt document; it says:

For any critical section C and any grace period G, at least
one of the following statements must hold:

(1) C ends before G does, and in addition, every store that
propagates to C's CPU before the end of C must propagate to
every CPU before G ends.

(2) G starts before C does, and in addition, every store that
propagates to G's CPU before the start of G must propagate
to every CPU before C starts.

Alan