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

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>

authored by

Paul E. McKenney and committed by
Boqun Feng
053ca725 366ba3f7

+7
+7
kernel/rcu/tree.c
··· 3172 3172 * 3173 3173 * Implementation of these memory-ordering guarantees is described here: 3174 3174 * 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(). 3175 3182 */ 3176 3183 void call_rcu(struct rcu_head *head, rcu_callback_t func) 3177 3184 {