From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
To: linux-kernel@vger.kernel.org
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
"Paul E. McKenney" <paulmck@linux.ibm.com>
Subject: [RFC] doc: rcu: remove note on smp_mb during synchronize_rcu
Date: Sat, 27 Oct 2018 21:30:46 -0700 [thread overview]
Message-ID: <20181028043046.198403-1-joel@joelfernandes.org> (raw)
As per this thread [1], it seems this smp_mb isn't needed anymore:
"So the smp_mb() that I was trying to add doesn't need to be there."
So let us remove this part from the memory ordering documentation.
[1] https://lkml.org/lkml/2017/10/6/707
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
.../Tree-RCU-Memory-Ordering.html | 32 +------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html b/Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html
index a346ce0116eb..0fb1511763d4 100644
--- a/Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html
+++ b/Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html
@@ -77,7 +77,7 @@ The key point is that the lock-acquisition functions, including
<tt>smp_mb__after_unlock_lock()</tt> immediately after successful
acquisition of the lock.
-<p>Therefore, for any given <tt>rcu_node</tt> struction, any access
+<p>Therefore, for any given <tt>rcu_node</tt> structure, any access
happening before one of the above lock-release functions will be seen
by all CPUs as happening before any access happening after a later
one of the above lock-acquisition functions.
@@ -162,36 +162,6 @@ an <tt>atomic_add_return()</tt> of zero) to detect idle CPUs.
<tr><td> </td></tr>
</table>
-<p>The approach must be extended to handle one final case, that
-of waking a task blocked in <tt>synchronize_rcu()</tt>.
-This task might be affinitied to a CPU that is not yet aware that
-the grace period has ended, and thus might not yet be subject to
-the grace period's memory ordering.
-Therefore, there is an <tt>smp_mb()</tt> after the return from
-<tt>wait_for_completion()</tt> in the <tt>synchronize_rcu()</tt>
-code path.
-
-<table>
-<tr><th> </th></tr>
-<tr><th align="left">Quick Quiz:</th></tr>
-<tr><td>
- What? Where???
- I don't see any <tt>smp_mb()</tt> after the return from
- <tt>wait_for_completion()</tt>!!!
-</td></tr>
-<tr><th align="left">Answer:</th></tr>
-<tr><td bgcolor="#ffffff"><font color="ffffff">
- That would be because I spotted the need for that
- <tt>smp_mb()</tt> during the creation of this documentation,
- and it is therefore unlikely to hit mainline before v4.14.
- Kudos to Lance Roy, Will Deacon, Peter Zijlstra, and
- Jonathan Cameron for asking questions that sensitized me
- to the rather elaborate sequence of events that demonstrate
- the need for this memory barrier.
-</font></td></tr>
-<tr><td> </td></tr>
-</table>
-
<p>Tree RCU's grace--period memory-ordering guarantees rely most
heavily on the <tt>rcu_node</tt> structure's <tt>->lock</tt>
field, so much so that it is necessary to abbreviate this pattern
--
2.19.1.568.g152ad8e336-goog
next reply other threads:[~2018-10-28 4:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-28 4:30 Joel Fernandes (Google) [this message]
2018-10-30 22:26 ` Joel Fernandes
2018-10-30 23:43 ` Paul E. McKenney
2018-10-31 1:11 ` Joel Fernandes
2018-10-31 18:17 ` Paul E. McKenney
2018-11-01 5:00 ` Joel Fernandes
2018-11-01 16:13 ` Paul E. McKenney
2018-11-02 6:15 ` Joel Fernandes
2018-11-02 20:00 ` Paul E. McKenney
2018-11-02 22:14 ` Joel Fernandes
2018-11-02 22:24 ` Paul E. McKenney
2018-11-03 5:12 ` Joel Fernandes
2018-11-03 23:22 ` Paul E. McKenney
2018-11-04 3:49 ` Joel Fernandes
2018-11-05 3:43 ` Paul E. McKenney
2018-11-05 4:43 ` Joel Fernandes
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=20181028043046.198403-1-joel@joelfernandes.org \
--to=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.ibm.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
all inboxes | Powered by JetHome®