linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] doc: rcu: remove note on smp_mb during synchronize_rcu
@ 2018-10-28  4:30 Joel Fernandes (Google)
  2018-10-30 22:26 ` Joel Fernandes
  0 siblings, 1 reply; 16+ messages in thread
From: Joel Fernandes (Google) @ 2018-10-28  4:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joel Fernandes (Google), Paul E. McKenney

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>&nbsp;</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>&nbsp;</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>&nbsp;</td></tr>
-</table>
-
 <p>Tree RCU's grace--period memory-ordering guarantees rely most
 heavily on the <tt>rcu_node</tt> structure's <tt>-&gt;lock</tt>
 field, so much so that it is necessary to abbreviate this pattern
-- 
2.19.1.568.g152ad8e336-goog


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-11-05  4:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28  4:30 [RFC] doc: rcu: remove note on smp_mb during synchronize_rcu Joel Fernandes (Google)
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

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).