[lttng-dev] [PATCH] [URCU] Allow forcing the use of sys membarrier
Duncan Sands
duncan.sands at deepbluecap.com
Fri Sep 16 15:38:49 UTC 2016
Hi Mathieu,
On 09/12/2016 05:05 PM, Mathieu Desnoyers wrote:
> ----- On Sep 6, 2016, at 9:07 AM, Duncan Sands duncan.sands at deepbluecap.com 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 ?
how about the attached patch?
Ciao, Duncan.
>
> Thanks,
>
> Mathieu
>
>>
>> Best wishes, Duncan.
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: force.diff
Type: text/x-patch
Size: 3719 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20160916/3ad01d44/attachment.bin>
More information about the lttng-dev
mailing list