<div dir="ltr"><div>> github repo is only a mirror. From the README.md you will notice a<br>> link to:<br>> <br>> Bug tracker: [Userspace RCU bug tracker](<a href="https://bugs.lttng.org/projects/urcu" rel="noreferrer" target="_blank">https://bugs.lttng.org/projects/urcu</a>)</div><div>> </div><div>> which has a "Feature" category.</div><div><br></div><div>Yes I actually visited that page. I just forgot to mention it. But I couldn't create a feature request. I guess I have to create an account then? I tried to create an account now and I have to wait for it to be verified. Why isn't the issues just on github instead as people are more familiar with that?</div><div><br></div>> The flag approach would allow your application to eventually complete,<br>> which may not be the case if you endlessly wait for all callbacks to<br>> be completed without preventing further callbacks to be enqueued.<div><br></div><div>In my case I have made a wrapper over cds_lfht which allows for recursive lfht inside each other. for all lfht nodes there is a callback function which in turn calls call_rcu on all the children lfht nodes. That means the number of rcu_barriers needed to be called at program exit is the same as the depth of lfht nodes. In this case there will never be an infinite callback chain so if I understood correctly then I don't think using a flag is relevant. I could iterate over every node to check the max depth but that seems dirty. Isn't there an internal variable to check for how many callbacks are left or if there are any at all? Or maybe it's unsafe to access it? </div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">man. 1. sep. 2025 kl. 17:04 skrev Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com">mathieu.desnoyers@efficios.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2025-08-31 16:42, Thobias Knudsen wrote:<br>
> First question: why isn't Userspace RCU more popular?<br>
<br>
One guess is that for many use-cases, locking is sufficient.<br>
<br>
RCU and lock-free data structures are relevant in performance, latency,<br>
and scalability sensitive use-cases.<br>
<br>
And of course we could probably do a better job at advertising its<br>
existence.<br>
<br>
> Second question: Why isn't it possible to create issues in the urcu <br>
> repo?<br>
<br>
github repo is only a mirror. From the README.md you will notice a<br>
link to:<br>
<br>
Bug tracker: [Userspace RCU bug tracker](<a href="https://bugs.lttng.org/projects/urcu" rel="noreferrer" target="_blank">https://bugs.lttng.org/projects/urcu</a>)<br>
<br>
which has a "Feature" category.<br>
<br>
> Im asking for a feature here:<br>
> Is it possible to make a function which checks if there are more <br>
> callbacks queued by call_rcu? I need that because there are some <br>
> callbacks which call call_rcu, and then calling rcu_barrier once <br>
> isn't enough and I therefore need a way to check if there are still <br>
> callbacks to wait on before terminating the program. No worries if this <br>
> is too much to ask for or if it isn't possible. This functionality is <br>
> only needed in termination because otherwise isn't needed to call <br>
> rcu_barrier multiple times (at least so far)<br>
<br>
Here is a relevant comment at the top of urcu_call_rcu_exit:<br>
<br>
* Here is how an application can ensure graceful teardown of this<br>
* worker thread:<br>
*<br>
* - An application queuing call_rcu callbacks should invoke<br>
* rcu_barrier() before it exits.<br>
* - When chaining call_rcu callbacks, the number of calls to<br>
* rcu_barrier() on application exit must match at least the maximum<br>
* number of chained callbacks.<br>
* - If an application chains callbacks endlessly, it would have to be<br>
* modified to stop chaining callbacks when it detects an application<br>
* exit (e.g. with a flag), and wait for quiescence with rcu_barrier()<br>
* after setting that flag.<br>
* - The statements above apply to a library which queues call_rcu<br>
* callbacks, only it needs to invoke rcu_barrier in its library<br>
* destructor.<br>
<br>
The flag approach would allow your application to eventually complete,<br>
which may not be the case if you endlessly wait for all callbacks to<br>
be completed without preventing further callbacks to be enqueued.<br>
<br>
Ideally please include the lttng-dev mailing list on those discussions<br>
in the future, so everyone can benefit from them.<br>
<br>
Thanks,<br>
<br>
Mathieu<br>
<br>
> <br>
> Best regards<br>
> Thobias<br>
> <br>
> <br>
<br>
<br>
-- <br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
<a href="https://www.efficios.com" rel="noreferrer" target="_blank">https://www.efficios.com</a><br>
</blockquote></div>