From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>,
Andrea Parri <parri.andrea@gmail.com>,
Will Deacon <will.deacon@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Boqun Feng <boqun.feng@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>,
David Howells <dhowells@redhat.com>,
Jade Alglave <j.alglave@ucl.ac.uk>,
Luc Maranget <luc.maranget@inria.fr>,
Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH] memory-model: fix cheat sheet typo
Date: Mon, 9 Apr 2018 11:42:58 -0700 [thread overview]
Message-ID: <20180409184258.GP3948@linux.vnet.ibm.com> (raw)
In-Reply-To: <1523292618-10207-1-git-send-email-pbonzini@redhat.com>
On Mon, Apr 09, 2018 at 06:50:15PM +0200, Paolo Bonzini wrote:
> "RWM" should be "RMW", and that's more or less the extent to which I
> can claim to change the document. :) In particular, "Self" is not
> documented and the difference between "Self" and "SV" is not clear
> to me.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Applied, though without the questions. ;-)
"Self" is for things like smp_load_acquire() and smp_store_release()
that order themselves against later and earlier accesses, respectively.
This ordering applies to later/earlier access to all variables, not
just the one that smp_load_acquire()/smp_store_release() accessed.
In contrast, things like smp_mb() order only other accesses, not
themselves. Or at least it is impossible to proves whether or not they
order themselves because they are not separately visible to other CPUs.
"SV" is "same variable", which applies to pretty much anything that
accesses a variable, but not to things like smp_mb() which do not.
Does that help?
Thanx, Paul
> ---
> tools/memory-model/Documentation/cheatsheet.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/memory-model/Documentation/cheatsheet.txt b/tools/memory-model/Documentation/cheatsheet.txt
> index 956b1ae4aafb..c0eafdaddfa4 100644
> --- a/tools/memory-model/Documentation/cheatsheet.txt
> +++ b/tools/memory-model/Documentation/cheatsheet.txt
> @@ -1,6 +1,6 @@
> Prior Operation Subsequent Operation
> --------------- ---------------------------
> - C Self R W RWM Self R W DR DW RMW SV
> + C Self R W RMW Self R W DR DW RMW SV
> -- ---- - - --- ---- - - -- -- --- --
>
> Store, e.g., WRITE_ONCE() Y Y
> --
> 1.8.3.1
>
next prev parent reply other threads:[~2018-04-09 18:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 16:50 [PATCH] memory-model: fix cheat sheet typo Paolo Bonzini
2018-04-09 18:42 ` Paul E. McKenney [this message]
2018-04-10 20:32 ` Paul E. McKenney
2018-04-10 21:10 ` Paolo Bonzini
2018-04-10 21:34 ` Paul E. McKenney
2018-04-11 11:15 ` Paolo Bonzini
2018-04-11 16:19 ` Paul E. McKenney
2018-04-11 16:31 ` Peter Zijlstra
2018-04-11 17:06 ` Paolo Bonzini
2018-04-12 12:52 ` Boqun Feng
2018-04-12 9:23 ` Andrea Parri
2018-04-12 10:18 ` Paolo Bonzini
2018-04-12 11:21 ` Andrea Parri
2018-04-12 21:18 ` Paul E. McKenney
2018-04-13 9:54 ` Andrea Parri
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=20180409184258.GP3948@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akiyks@gmail.com \
--cc=boqun.feng@gmail.com \
--cc=dhowells@redhat.com \
--cc=j.alglave@ucl.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.maranget@inria.fr \
--cc=npiggin@gmail.com \
--cc=parri.andrea@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=stern@rowland.harvard.edu \
--cc=will.deacon@arm.com \
/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