From 64478021edcf7a5ac3bca3fa9e8b8108d2fbb9b6 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 6 Sep 2017 16:35:59 -0400 Subject: [PATCH] Fix: don't use membarrier SHARED syscall command in liburcu-bp 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 --- src/urcu-bp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/urcu-bp.c b/src/urcu-bp.c index c0fac83..ebe96c5 100644 --- a/src/urcu-bp.c +++ b/src/urcu-bp.c @@ -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 -- 2.34.1