Disable signals in URCU background threads
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Sep 2022 17:55:03 +0000 (13:55 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Sep 2022 14:29:45 +0000 (10:29 -0400)
commitea3a28a3f71dd02fb34ed4e3108f93275dbef89a
treecd489f8b55bbc499a875add92886898b5160c9cc
parentd428afc44ee5aa598c8033939ae1c1ac806f1a15
Disable signals in URCU background threads

Applications using signalfd depend on signals being blocked in all
threads of the process, otherwise threads with unblocked signals
can receive them and starve the signalfd.

While some threads in URCU do block signals (e.g. workqueue
worker for rculfhash), the call_rcu, defer_rcu, and rculfhash
partition_resize_helper threads do not.

Always block all signals before creating threads, and only unblock
SIGRCU when registering a urcu-signal thread. Restore the SIGRCU
signal to its pre-registration blocked state on unregistration.

For rculfhash, cds_lfht_worker_init can be removed, because its only
effect is to block all signals except SIGRCU. Blocking all signals is
already done by the workqueue code, and unbloking SIGRCU is now done by
the urcu signal flavor thread regisration.

Co-developed-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: If78346b15bdc287417b992a8963098c6ea0dc7d2
src/rculfhash.c
src/urcu-call-rcu-impl.h
src/urcu-defer-impl.h
src/urcu.c
src/workqueue.c
This page took 0.025848 seconds and 4 git commands to generate.