[lttng-dev] User-space RCU: call rcu_barrier() before dissociating helper thread?

Martin Wilck mwilck at suse.com
Thu Apr 29 09:49:43 EDT 2021

In multipath-tools, we are using a custom RCU helper thread, which is cleaned out
on exit:


I put a call to rcu_barrier() there in order to make sure all callbacks had finished
before detaching the helper thread.

Now we got a report that rcu_barrier() isn't available before user-space RCU 0.8 
(https://github.com/opensvc/multipath-tools/issues/5) (and RHEL7 / Centos7 
still has 0.7.16).

Question: was it over-cautious or otherwise wrong to call rcu_barrier() before
set_thread_call_rcu_data(NULL)? Can we maybe just skip this call? If no, what
would be the recommended way for liburcu < 0.8 to dissociate a helper thread?

(Note: I'm not currently subscribed to lttng-dev).

Regards and thanks,

More information about the lttng-dev mailing list