Skip to content

Commit ed336c6

Browse files
committed
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 <[email protected]>
1 parent 4d2f862 commit ed336c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Documentation/RCU/checklist.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ over a rather long period of time, but improvements are always welcome!
190190

191191
5. If call_rcu() or call_srcu() is used, the callback function will
192192
be called from softirq context. In particular, it cannot block.
193+
If you need the callback to block, run that code in a workqueue
194+
handler scheduled from the callback. The queue_rcu_work()
195+
function does this for you in the case of call_rcu().
193196

194197
6. Since synchronize_rcu() can block, it cannot be called
195198
from any sort of irq context. The same rule applies

0 commit comments

Comments
 (0)