Fix: don't use membarrier SHARED syscall command in liburcu-bp
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Sep 2017 20:35:59 +0000 (16:35 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Sep 2017 20:40:20 +0000 (16:40 -0400)
One main user of liburcu-bp (lttng-ust) invokes synchronize_rcu()
repeatedly, without batching (does not use call_rcu).

Those delays introduced by sys_membarrier SHARED command significantly
impacts application startup time. Therefore, revert to not using the
membarrier SHARED command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/urcu-bp.c

index c0fac8330bdc43a5d1eb58a6999057461c44a002..ebe96c57da9630d3e43168ee32fa96da95277bfa 100644 (file)
@@ -593,8 +593,13 @@ void rcu_sys_membarrier_status(int available)
 static
 void rcu_sys_membarrier_status(int available)
 {
-       if (available)
-               urcu_bp_has_sys_membarrier = 1;
+       /*
+        * membarrier has blocking behavior, which changes the
+        * application behavior too much compared to using barriers when
+        * synchronize_rcu is used repeatedly (without using call_rcu).
+        * Don't use membarrier for now, unless its use has been
+        * explicitly forced when building liburcu.
+        */
 }
 #endif
 
This page took 0.025738 seconds and 4 git commands to generate.