Re: [PATCH v2] tools/memory-model: Document herd7 (abstract) representation

From: Alan Stern
Date: Wed Jun 05 2024 - 11:53:58 EST


On Wed, Jun 05, 2024 at 03:49:18PM +0200, Andrea Parri wrote:
> tools/memory-model/ and herdtool7 are closely linked: the latter is
> responsible for (pre)processing each C-like macro of a litmus test,
> and for providing the LKMM with a set of events, or "representation",
> corresponding to the given macro. Provide herd-representation.txt
> to document the representations of the concurrency macros, following
> their "classification" in Documentation/atomic_t.txt.
>
> Suggested-by: Hernan Ponce de Leon <hernan.poncedeleon@xxxxxxxxxxxxxxx>
> Signed-off-by: Andrea Parri <parri.andrea@xxxxxxxxx>

> --- /dev/null
> +++ b/tools/memory-model/Documentation/herd-representation.txt
> @@ -0,0 +1,107 @@
> +#
> +# Legenda:
> +# R, a Load event
> +# W, a Store event
> +# F, a Fence event
> +# LKR, a Lock-Read event
> +# LKW, a Lock-Write event
> +# UL, an Unlock event
> +# LF, a Lock-Fail event
> +# RL, a Read-Locked event
> +# RU, a Read-Unlocked event
> +# R*, a Load event included in RMW
> +# W*, a Store event included in RMW
> +# SRCU, a Sleepable-Read-Copy-Update event
> +#
> +# po, a Program-Order link
> +# rmw, a Read-Modify-Write link
> +# lk-rmw, a Lock-Read-Modify-Write link

I wonder if we really need a special notation for lk-rmw. Is anything
wrong with using the normal rmw notation for these links?

Alan