Skip to content

Commit 21ef249

Browse files
paulmckrcufbq
authored andcommitted
rcu: Document self-propagating callbacks
This commit documents the fact that a given RCU callback function can repost itself. Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
1 parent df0cee4 commit 21ef249

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

kernel/rcu/tree.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3107,7 +3107,7 @@ module_param(enable_rcu_lazy, bool, 0444);
31073107
* critical sections have completed.
31083108
*
31093109
* Use this API instead of call_rcu() if you don't want the callback to be
3110-
* invoked after very long periods of time, which can happen on systems without
3110+
* delayed for very long periods of time, which can happen on systems without
31113111
* memory pressure and on systems which are lightly loaded or mostly idle.
31123112
* This function will cause callbacks to be invoked sooner than later at the
31133113
* expense of extra power. Other than that, this function is identical to, and
@@ -3138,6 +3138,12 @@ EXPORT_SYMBOL_GPL(call_rcu_hurry);
31383138
* might well execute concurrently with RCU read-side critical sections
31393139
* that started after call_rcu() was invoked.
31403140
*
3141+
* It is perfectly legal to repost an RCU callback, potentially with
3142+
* a different callback function, from within its callback function.
3143+
* The specified function will be invoked after another full grace period
3144+
* has elapsed. This use case is similar in form to the common practice
3145+
* of reposting a timer from within its own handler.
3146+
*
31413147
* RCU read-side critical sections are delimited by rcu_read_lock()
31423148
* and rcu_read_unlock(), and may be nested. In addition, but only in
31433149
* v5.0 and later, regions of code across which interrupts, preemption,

0 commit comments

Comments
 (0)