From: Alan Stern <stern@rowland.harvard.edu>
To: Jonas Oberhauser <jonas.oberhauser@huawei.com>
Cc: Joel Fernandes <joel@joelfernandes.org>,
Hernan Luis Ponce de Leon <hernanl.leon@huawei.com>,
Boqun Feng <boqun.feng@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
"parri.andrea@gmail.com" <parri.andrea@gmail.com>,
"will@kernel.org" <will@kernel.org>,
"npiggin@gmail.com" <npiggin@gmail.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
"j.alglave@ucl.ac.uk" <j.alglave@ucl.ac.uk>,
"luc.maranget@inria.fr" <luc.maranget@inria.fr>,
"akiyks@gmail.com" <akiyks@gmail.com>,
"dlustig@nvidia.com" <dlustig@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: Re: "Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models"
Date: Mon, 12 Sep 2022 08:01:03 -0400 [thread overview]
Message-ID: <Yx8ff+Q/mNu/3R92@rowland.harvard.edu> (raw)
In-Reply-To: <34735a476c3b4913985de3403a6216bd@huawei.com>
On Mon, Sep 12, 2022 at 10:13:33AM +0000, Jonas Oberhauser wrote:
> As I tried to explain before, this problem has nothing to do with
> stores propagating within a given time to another core. Rather it is
> due to two stores to the same location happening in a surprising
> order. I.e., both stores propagate quickly to other cores, but in a
> surprising coherence order.And if a wmb in the code is replaced by an
> mb, then this co will create a pb cycle and become forbidden.
>
> Therefore this hang should be observable on a hypothetical LKMM
> processor which makes use of all the relaxed liberty the LKMM allows.
> However according to the authors of that paper (who are my colleagues
> but I haven't been involved deeply in that work), not even Power+gcc
> allow this reordering to happen, and if that's true it is probably
> because the wmb is mapped to lwsync which is fully cumulative in Power
> but not in LKMM.
Yes, that's right. On ARM64 architectures the reordering is forbidden
by other multi-copy atomicity, and on PPC is it forbidden by
B-cumulativity (neither of which is part of the LKMM).
If I'm not mistaken, another way to forbid it is to replace one of the
relaxed atomic accesses with an atomic access having release semantics.
Perhaps this change will find its way into the kernel source, since it
has less overhead than replacing wmb with bm.
Alan
next prev parent reply other threads:[~2022-09-12 12:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 12:48 Paul E. McKenney
2022-08-26 16:21 ` Boqun Feng
2022-08-26 16:23 ` Peter Zijlstra
2022-08-26 17:10 ` Alan Stern
2022-08-26 20:42 ` Paul E. McKenney
2022-08-27 16:00 ` Alan Stern
2022-08-27 17:04 ` Paul E. McKenney
2022-09-13 11:24 ` Will Deacon
2022-09-13 12:21 ` Dan Lustig
2022-09-16 8:18 ` Will Deacon
2022-08-26 23:47 ` Peter Zijlstra
2022-08-27 16:05 ` Alan Stern
2022-08-27 16:44 ` Boqun Feng
2022-08-29 2:15 ` Andrea Parri
2022-09-09 11:45 ` Jonas Oberhauser
2022-09-10 12:11 ` Hernan Luis Ponce de Leon
2022-09-10 15:03 ` Alan Stern
2022-09-10 20:41 ` Hernan Luis Ponce de Leon
2022-09-11 10:20 ` Joel Fernandes
2022-09-12 10:13 ` Jonas Oberhauser
2022-09-12 11:10 ` Hernan Luis Ponce de Leon
2022-09-14 14:41 ` Alan Stern
2022-09-12 12:01 ` Alan Stern [this message]
2022-09-11 14:53 ` Andrea Parri
2022-09-12 10:46 ` Jonas Oberhauser
2022-09-12 12:02 ` Alan Stern
2022-08-29 2:33 ` Andrea Parri
2022-08-29 12:25 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yx8ff+Q/mNu/3R92@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=akiyks@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=dlustig@nvidia.com \
--cc=hernanl.leon@huawei.com \
--cc=j.alglave@ucl.ac.uk \
--cc=joel@joelfernandes.org \
--cc=jonas.oberhauser@huawei.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=npiggin@gmail.com \
--cc=parri.andrea@gmail.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®