Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks

From: Andrea Parri
Date: Mon Jun 25 2018 - 04:29:36 EST


On Mon, Jun 25, 2018 at 09:32:29AM +0200, Peter Zijlstra wrote:
>
> I have yet to digest the rest of the discussion, however:
>
> On Fri, Jun 22, 2018 at 02:09:04PM -0400, Alan Stern wrote:
> > The LKMM uses the same CAT code for acquire/release and lock/unlock.
> > (In essence, it considers a lock to be an acquire and an unlock to be a
> > release; everything else follows from that.) Treating one differently
> > from the other in these tests would require some significant changes.
> > It wouldn't be easy.
>
> That is problematic, acquire+release are very much simpler operations
> than lock+unlock.
>
> At the very least, lock includes a control-dependency, where acquire
> does not.

I don't see how this is relevant here; roughly, "if something is guaranteed
by a control-dependency, that is also guaranteed by an acquire". Right? ;)

Andrea