[lttng-dev] [RFC PATCH liburcu 0/2] Remove RCU requirements on hash table destroy

Paul E. McKenney paulmck at linux.vnet.ibm.com
Mon Jun 5 22:56:08 UTC 2017


On Tue, May 30, 2017 at 05:10:18PM -0400, Mathieu Desnoyers wrote:
> The RCU lock-free hash table currently requires that the destroy
> function should not be called from within RCU read-side critical
> sections. This is caused by the lazy resize, which uses the call_rcu
> worker thread, even though all it really needs is a workqueue/worker
> thread scheme.
> 
> Implement an internal workqueue API in liburcu, and use it instead of
> call_rcu in rculfhash to overcome this limitation.

Took a quick look, and it appears plausible.

Some opportunity to share CPU-affinity code between this and the
call_rcu() code, FWIW.  Two of the system-call stubs look to be identical
other than the system call (EINTR checks and soforth), but I am not sure
that it is worth combining them.

								Thanx, Paul

> Mathieu Desnoyers (2):
>   Implement urcu workqueues internal API
>   Use workqueue in rculfhash
> 
>  include/urcu/rculfhash.h |  15 +-
>  src/Makefile.am          |   2 +-
>  src/rculfhash-internal.h |   2 +-
>  src/rculfhash.c          | 124 ++++++------
>  src/workqueue.c          | 507 +++++++++++++++++++++++++++++++++++++++++++++++
>  src/workqueue.h          | 104 ++++++++++
>  6 files changed, 686 insertions(+), 68 deletions(-)
>  create mode 100644 src/workqueue.c
>  create mode 100644 src/workqueue.h
> 
> -- 
> 2.1.4
> 



More information about the lttng-dev mailing list