[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1807101315140.1449-100000@iolanthe.rowland.org>
Date: Tue, 10 Jul 2018 13:17:50 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Daniel Lustig <dlustig@...dia.com>
cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
LKMM Maintainers -- Akira Yokosawa <akiyks@...il.com>,
Andrea Parri <andrea.parri@...rulasolutions.com>,
Boqun Feng <boqun.feng@...il.com>,
David Howells <dhowells@...hat.com>,
Jade Alglave <j.alglave@....ac.uk>,
Luc Maranget <luc.maranget@...ia.fr>,
Nicholas Piggin <npiggin@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Will Deacon <will.deacon@....com>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and
remove it for ordinary release/acquire
On Tue, 10 Jul 2018, Daniel Lustig wrote:
> > --- usb-4.x.orig/tools/memory-model/linux-kernel.cat
> > +++ usb-4.x/tools/memory-model/linux-kernel.cat
> > @@ -38,7 +38,7 @@ let strong-fence = mb | gp
> > (* Release Acquire *)
> > let acq-po = [Acquire] ; po ; [M]
> > let po-rel = [M] ; po ; [Release]
> > -let rfi-rel-acq = [Release] ; rfi ; [Acquire]
> > +let unlock-rf-lock-po = [UL] ; rf ; [LKR] ; po
>
> It feels slightly weird that unlock-rf-lock-po is asymmetrical. And in
> fact, I think the current RISC-V solution we've been discussing (namely,
> putting a fence.tso instead of a fence rw,w in front of the release)
> may not even technically respect that particular sequence. The
> fence.tso solution really enforces "po; [UL]; rf; [LKR]", right?
>
> Does something like "po; [UL]; rf; [LKR]; po" fit in with the rest
> of the model? If so, maybe that solves the asymmetry and also
> legalizes the approach of putting fence.tso in front?
That would work just as well. For this version of the patch it
doesn't make any difference, because nothing that comes po-after the
LKR is able to directly read the value stored by the UL.
Alan
Powered by blists - more mailing lists