----- On Sep 6, 2016, at 9:07 AM, Duncan Sands [email protected] 
wrote:

> When using the RCU_MEMBARRIER flavour of userspace-RCU, kernel support for
> sys-membarrier is detected dynamically and stored in the 
> rcu_has_sys_membarrier
> global variable.  Checking the value of this variable adds a small but
> measurable overhead to smp_mb_slave.  I only use userspace-rcu on systems 
> which
> support sys-membarrier, and I'd like a way of avoiding that overhead.
> 
> The attached patch makes the following changes: if RCU_FORCE_SYS_MEMBARRIER is
> defined then rcu_has_sys_membarrier is replaced with the constant 1, 
> eliminating
> the overhead in smp_mb_slave.  As a sanity check, support for sys-membarrier 
> is
> still detected at startup and if it isn't supported then the program aborts.
> 
> I didn't try to integrate this feature into the build system (eg by adding a
> configure option for it) since I'm using my own build system.

Hi Duncan,

This is an interesting improvement. I'd be interested to merge it if it was
integrated with the liburcu build system. Perhaps a 
--disable-dynamic-membarrier-check
at configure ?

Thanks,

Mathieu

> 
> Best wishes, Duncan.
> 
> _______________________________________________
> lttng-dev mailing list
> [email protected]
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to