Skip to content

Commit 053ca72

Browse files
paulmckrcufbq
authored andcommitted
rcu: Add CONFIG_RCU_LAZY delays to call_rcu() kernel-doc header
This commit adds a description of the energy-efficiency delays that call_rcu() can impose, along with a pointer to call_rcu_hurry() for latency-sensitive kernel code. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
1 parent 366ba3f commit 053ca72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/rcu/tree.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,6 +3172,13 @@ EXPORT_SYMBOL_GPL(call_rcu_hurry);
31723172
*
31733173
* Implementation of these memory-ordering guarantees is described here:
31743174
* Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst.
3175+
*
3176+
* Specific to call_rcu() (as opposed to the other call_rcu*() functions),
3177+
* in kernels built with CONFIG_RCU_LAZY=y, call_rcu() might delay for many
3178+
* seconds before starting the grace period needed by the corresponding
3179+
* callback. This delay can significantly improve energy-efficiency
3180+
* on low-utilization battery-powered devices. To avoid this delay,
3181+
* in latency-sensitive kernel code, use call_rcu_hurry().
31753182
*/
31763183
void call_rcu(struct rcu_head *head, rcu_callback_t func)
31773184
{

0 commit comments

Comments
 (0)