Skip to contentSkip to conversation

defer/rcufundamental: Clarify rcu_dereference() ordering semantics

PATCH New Kunwu Chan 1 participant 1 message Feb 25

lore
Share & tools
lore

Kunwu Chan

author
#0 lore raw

PATCH 1/1 defer/rcufundamental: Clarify rcu_dereference() ordering semantics

Replace a grammar-only sentence with wording aligned with the normative statement in defer/rcuintro.tex. That statement defines rcu_dereference() as preventing compiler and (in one case) CPU reordering of the pointer load with later dereference-side memory operations.

---
 defer/rcufundamental.tex | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
defer/rcufundamental.tex +3 -3
index c3bcc4f0..ccfe9133 100644
@@ -118,9 +118,9 @@ synchronization overhead.
 	before freeing the removed data.
 }\QuickQuizEnd
 
-Subscription is carried out by \co{rcu_dereference()}, which orders
-the subscription operation's load from the pointer is before the
-dereference.
+Subscription is carried out by \co{rcu_dereference()}, which prevents
+the compiler and (in one case) the CPU from reordering the pointer
+load with later memory operations that dereference that pointer.
 Similar to \co{rcu_assign_pointer()}, \co{rcu_dereference()} must be
 atomic in the sense that the value loaded must be that from a single
 store, for example, the compiler must not tear the load.\footnote{
Signature · 1 line
2.25.1