Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Paul E. McKenney and committed by
Boqun Feng
21ef2498 df0cee43

+7 -1
+7 -1
kernel/rcu/tree.c
··· 3107 3107 * critical sections have completed. 3108 3108 * 3109 3109 * 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 3111 3111 * memory pressure and on systems which are lightly loaded or mostly idle. 3112 3112 * This function will cause callbacks to be invoked sooner than later at the 3113 3113 * expense of extra power. Other than that, this function is identical to, and ··· 3137 3137 * critical sections have completed. However, the callback function 3138 3138 * might well execute concurrently with RCU read-side critical sections 3139 3139 * that started after call_rcu() was invoked. 3140 + * 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. 3140 3146 * 3141 3147 * RCU read-side critical sections are delimited by rcu_read_lock() 3142 3148 * and rcu_read_unlock(), and may be nested. In addition, but only in