Skip to content

Commit

Permalink
rcu: Add CONFIG_RCU_LAZY delays to call_rcu() kernel-doc header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney authored and Boqun Feng committed Feb 5, 2025
1 parent 366ba3f commit 053ca72
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3172,6 +3172,13 @@ EXPORT_SYMBOL_GPL(call_rcu_hurry);
*
* Implementation of these memory-ordering guarantees is described here:
* Documentation/RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.rst.
*
* Specific to call_rcu() (as opposed to the other call_rcu*() functions),
* in kernels built with CONFIG_RCU_LAZY=y, call_rcu() might delay for many
* seconds before starting the grace period needed by the corresponding
* callback. This delay can significantly improve energy-efficiency
* on low-utilization battery-powered devices. To avoid this delay,
* in latency-sensitive kernel code, use call_rcu_hurry().
*/
void call_rcu(struct rcu_head *head, rcu_callback_t func)
{
Expand Down

0 comments on commit 053ca72

Please sign in to comment.