From: Mathieu Desnoyers Date: Sat, 5 Sep 2009 16:35:46 +0000 (-0400) Subject: Document access ordering of rcu_dereference wrt VSS X-Git-Tag: v0.1~99 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=809f4fdeada96d22ac2d91603f3dfb68282f4071;p=userspace-rcu.git Document access ordering of rcu_dereference wrt VSS Signed-off-by: Mathieu Desnoyers --- 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(). */