tools/memory-model: Define effect of Mb tags on RMWs in tools/...
authorJonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Mon, 30 Sep 2024 10:57:08 +0000 (12:57 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2025 15:40:23 +0000 (07:40 -0800)
commit29279349a566232057f52392d1a8af91772de7e1
treeead5bc04558159317be2a98b0d7fb050a14b2318
parent723177d712241238101b672b97b35734f86481f3
tools/memory-model: Define effect of Mb tags on RMWs in tools/...

Herd7 transforms successful RMW with Mb tags by inserting smp_mb() fences
around them. We emulate this by considering imaginary po-edges before the
RMW read and before the RMW write, and extending the smp_mb() ordering
rule, which currently only applies to real po edges that would be found
around a really inserted smp_mb(), also to cases of the only imagined po
edges.

Reported-by: Viktor Vafeiadis <viktor@mpi-sws.org>
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Jonas Oberhauser <jonas.oberhauser@huaweicloud.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
tools/memory-model/linux-kernel.cat