summaryrefslogtreecommitdiffstats
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-07-28 21:00:50 +0200
committerPaul E. McKenney <paulmck@kernel.org>2022-08-31 13:58:14 +0200
commited336c6fe4c0110a56f6f237865ff9660de8c598 (patch)
tree2575e764fb97798c5e74dfd4384929c840790657 /Documentation/RCU
parentdoc: Emphasize the need for explicit RCU read-side markers (diff)
downloadlinux-ed336c6fe4c0110a56f6f237865ff9660de8c598.tar.xz
linux-ed336c6fe4c0110a56f6f237865ff9660de8c598.zip
doc: Call out queue_rcu_work() for blocking RCU callbacks
The current checklist.rst file correctly notes that RCU callbacks execute in BH context, and cannot block. This commit adds words advising people needing callbacks to block to use workqueues, for example, by replacing call_rcu() with queue_rcu_work(). Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r--Documentation/RCU/checklist.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/RCU/checklist.rst b/Documentation/RCU/checklist.rst
index 5eedef027d92..2db206fc3465 100644
--- a/Documentation/RCU/checklist.rst
+++ b/Documentation/RCU/checklist.rst
@@ -190,6 +190,9 @@ over a rather long period of time, but improvements are always welcome!
5. If call_rcu() or call_srcu() is used, the callback function will
be called from softirq context. In particular, it cannot block.
+ If you need the callback to block, run that code in a workqueue
+ handler scheduled from the callback. The queue_rcu_work()
+ function does this for you in the case of call_rcu().
6. Since synchronize_rcu() can block, it cannot be called
from any sort of irq context. The same rule applies