[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aE-3_mJPjea62anv@andrea>
Date: Mon, 16 Jun 2025 08:21:50 +0200
From: Andrea Parri <parri.andrea@...il.com>
To: Thomas Haas <t.haas@...bs.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Alan Stern <stern@...land.harvard.edu>,
Will Deacon <will@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Nicholas Piggin <npiggin@...il.com>,
David Howells <dhowells@...hat.com>,
Jade Alglave <j.alglave@....ac.uk>,
Luc Maranget <luc.maranget@...ia.fr>,
"Paul E. McKenney" <paulmck@...nel.org>,
Akira Yokosawa <akiyks@...il.com>,
Daniel Lustig <dlustig@...dia.com>,
Joel Fernandes <joelagnelf@...dia.com>,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
lkmm@...ts.linux.dev, hernan.poncedeleon@...weicloud.com,
jonas.oberhauser@...weicloud.com,
"r.maseli@...bs.de" <r.maseli@...bs.de>
Subject: Re: [RFC] Potential problem in qspinlock due to mixed-size accesses
> Thanks for the praise. I expected more questioning/discussion and less
> immediate acceptance :)
Well, the discussion isn't closed yet. ;-)
> Maybe one should also take into consideration a hypothetical extension of
> LKMM to MSA.
> I think LKMM (and also C11) do not preserve REL->ACQ ordering because this
> would disallow their implementation as simple stores/loads on TSO.
> That being said, maybe preserving "rmw;[REL];po;[ACQ]" on the
> language-level would be fine and sufficient for qspinlock.
On PPC say, the expression can translate to a sequence "lwsync ; lwarx ;
stwcx. ; ... ; lwz ; lwsync", in which the order of the two loads is not
necessarily preserved.
MSAs have been on the LKMM TODO list for quite some time. I'm confident
this thread will help to make some progress or at least to reinforce the
interest in the topic.
Andrea
Powered by blists - more mailing lists