[lttng-dev] QSBR urcu read lock question
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Thu Apr 15 12:00:28 EDT 2021
----- On Apr 15, 2021, at 10:54 AM, lbj lbj137 at yahoo.com wrote:
> Mathieu,
> Thanks so much for your wealth if information and timely responses, they are
> greatly appreciated. Final question: is there any harm in explicitly calling
> rcu_thread_online/rcu_thread_offline from within my call_rcu callback function?
> From what you described it sounds like it would be redundant, but presumably
> would be harmless. Correct? Thanks again.
You could indeed invoke pairs of:
rcu_thread_offline(); <--- emphasis on _offline_ here.
[ long wait ... ]
rcu_thread_online();
in that specific order within the call-rcu worker thread. Note that the qsbr state
of the call-rcu worker thread is "online" when it invokes the callbacks, so each callback
should make sure that state is back to "online" before it returns control back
to its caller.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list