From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
SeongJae Park <sjpark@amazon.de>,
"Paul E . McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 9/9] Documentation/memory-barriers: Fix typos
Date: Fri, 14 Feb 2020 15:39:03 -0800 [thread overview]
Message-ID: <20200214233903.12916-9-paulmck@kernel.org> (raw)
In-Reply-To: <@@@>
From: SeongJae Park <sjpark@amazon.de>
Signed-off-by: SeongJae Park <sjpark@amazon.de>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
Documentation/memory-barriers.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 7146da0..e1c355e 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -185,7 +185,7 @@ As a further example, consider this sequence of events:
=============== ===============
{ A == 1, B == 2, C == 3, P == &A, Q == &C }
B = 4; Q = P;
- P = &B D = *Q;
+ P = &B; D = *Q;
There is an obvious data dependency here, as the value loaded into D depends on
the address retrieved from P by CPU 2. At the end of the sequence, any of the
@@ -569,7 +569,7 @@ following sequence of events:
{ A == 1, B == 2, C == 3, P == &A, Q == &C }
B = 4;
<write barrier>
- WRITE_ONCE(P, &B)
+ WRITE_ONCE(P, &B);
Q = READ_ONCE(P);
D = *Q;
@@ -1721,7 +1721,7 @@ of optimizations:
and WRITE_ONCE() are more selective: With READ_ONCE() and
WRITE_ONCE(), the compiler need only forget the contents of the
indicated memory locations, while with barrier() the compiler must
- discard the value of all memory locations that it has currented
+ discard the value of all memory locations that it has currently
cached in any machine registers. Of course, the compiler must also
respect the order in which the READ_ONCE()s and WRITE_ONCE()s occur,
though the CPU of course need not do so.
@@ -1833,7 +1833,7 @@ Aside: In the case of data dependencies, the compiler would be expected
to issue the loads in the correct order (eg. `a[b]` would have to load
the value of b before loading a[b]), however there is no guarantee in
the C specification that the compiler may not speculate the value of b
-(eg. is equal to 1) and load a before b (eg. tmp = a[1]; if (b != 1)
+(eg. is equal to 1) and load a[b] before b (eg. tmp = a[1]; if (b != 1)
tmp = a[b]; ). There is also the problem of a compiler reloading b after
having loaded a[b], thus having a newer copy of b than a[b]. A consensus
has not yet been reached about these problems, however the READ_ONCE()
--
2.9.5
next prev parent reply other threads:[~2020-02-14 23:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <@@@>
2020-02-14 23:38 ` [PATCH tip/core/rcu 1/9] doc: Add some more RCU list patterns in the kernel paulmck
2020-02-14 23:38 ` [PATCH tip/core/rcu 2/9] doc/RCU/Design: Remove remaining HTML tags in ReST files paulmck
2020-02-14 23:38 ` [PATCH tip/core/rcu 3/9] doc/RCU/listRCU: Fix typos in a example code snippets paulmck
2020-02-14 23:38 ` [PATCH tip/core/rcu 4/9] doc/RCU/listRCU: Update example function name paulmck
2020-02-14 23:38 ` [PATCH tip/core/rcu 5/9] doc/RCU/rcu: Use ':ref:' for links to other docs paulmck
2020-02-14 23:39 ` [PATCH tip/core/rcu 6/9] doc/RCU/rcu: Use absolute paths for non-rst files paulmck
2020-02-14 23:39 ` [PATCH tip/core/rcu 7/9] doc/RCU/rcu: Use https instead of http if possible paulmck
2020-02-14 23:39 ` [PATCH tip/core/rcu 8/9] doc: Add rcutorture scripting to torture.txt paulmck
2020-02-14 23:39 ` paulmck [this message]
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 1/6] srcu: Make Tiny SRCU use multi-bit grace-period counter paulmck
2020-11-23 4:31 ` Neeraj Upadhyay
2020-11-23 19:55 ` Paul E. McKenney
2020-11-24 5:18 ` Neeraj Upadhyay
2020-11-25 4:33 ` Neeraj Upadhyay
2020-11-28 2:16 ` Paul E. McKenney
2020-11-28 4:12 ` Neeraj Upadhyay
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 2/6] srcu: Provide internal interface to start a Tiny SRCU grace period paulmck
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 3/6] srcu: Provide internal interface to start a Tree " paulmck
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 4/6] srcu: Provide polling interfaces for Tiny SRCU grace periods paulmck
2020-11-22 14:30 ` Neeraj Upadhyay
2020-11-22 17:57 ` Paul E. McKenney
2020-11-23 4:43 ` Neeraj Upadhyay
2020-11-23 21:12 ` Paul E. McKenney
2020-11-24 5:14 ` Neeraj Upadhyay
2020-11-24 19:30 ` Paul E. McKenney
2020-11-25 4:39 ` Neeraj Upadhyay
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 5/6] srcu: Provide polling interfaces for Tree " paulmck
2020-11-27 4:52 ` Neeraj Upadhyay
2020-11-21 0:59 ` [PATCH v2 tip/core/rcu 6/6] srcu: Document " paulmck
2020-11-27 8:27 ` Neeraj Upadhyay
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=20200214233903.12916-9-paulmck@kernel.org \
--to=paulmck@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sjpark@amazon.de \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).