From 809f4fdeada96d22ac2d91603f3dfb68282f4071 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 5 Sep 2009 12:35:46 -0400 Subject: [PATCH] Document access ordering of rcu_dereference wrt VSS Signed-off-by: Mathieu Desnoyers --- urcu-static.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/urcu-static.h b/urcu-static.h index 1921097..91d3747 100644 --- a/urcu-static.h +++ b/urcu-static.h @@ -76,6 +76,13 @@ * Inserts memory barriers on architectures that require them (currently only * Alpha) and documents which pointers are protected by RCU. * + * The compiler memory barrier in LOAD_SHARED() ensures that value-speculative + * optimizations (e.g. VSS: Value Speculation Scheduling) does not perform the + * data read before the pointer read by speculating the value of the pointer. + * Correct ordering is ensured because the pointer is read as a volatile access. + * This acts as a global side-effect operation, which forbids reordering of + * dependent memory operations. + * * Should match rcu_assign_pointer() or rcu_xchg_pointer(). */ -- 2.34.1