urcu: Add extra "engineering safety factor" memory barrier in update_counter_and_wait()
[urcu.git] / urcu.c
diff --git a/urcu.c b/urcu.c
index b8567555d09ecbb22547aa6f236392d439eea871..bb6629c718086a9800a22a4d3ab21685b27c26a5 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -215,6 +215,10 @@ void update_counter_and_wait(void)
         */
 
        /*
+        * Enforce compiler-order of store to rcu_gp_ctr before before
+        * load rcu_reader ctr.
+        * This ensures synchronize_rcu() cannot be starved by readers.
+        *
         * Adding a smp_mb() which is _not_ formally required, but makes the
         * model easier to understand. It does not have a big performance impact
         * anyway, given this is the write-side.
This page took 0.02206 seconds and 4 git commands to generate.