]> git.ipfire.org Git - thirdparty/linux.git/commit
rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path
authorJoel Fernandes <joelagnelf@nvidia.com>
Fri, 23 Jan 2026 14:30:12 +0000 (09:30 -0500)
committerBoqun Feng <boqun.feng@gmail.com>
Fri, 23 Jan 2026 19:12:25 +0000 (11:12 -0800)
commitd92eca60fea944b2e9272603308a0fde8b6ae447
treeaf0b02f68a8820e4d907f4b5c5bf3a8c424e1f22
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8
rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path

The WakeOvfIsDeferred code path in __call_rcu_nocb_wake() attempts to
wake rcuog when the callback count exceeds qhimark and callbacks aren't
done with their GP (newly queued or awaiting GP). However, a lot of
testing proves this wake is always redundant or useless.

In the flooding case, rcuog is always waiting for a GP to finish. So
waking up the rcuog thread is pointless. The timer wakeup adds overhead,
rcuog simply wakes up and goes back to sleep achieving nothing.

This path also adds a full memory barrier, and additional timer expiry
modifications unnecessarily.

The root cause is that WakeOvfIsDeferred fires when
!rcu_segcblist_ready_cbs() (GP not complete), but waking rcuog cannot
accelerate GP completion.

This commit therefore removes this path.

Tested with rcutorture scenarios: TREE01, TREE05, TREE08 (all NOCB
configurations) - all pass. Also stress tested using a kernel module
that floods call_rcu() to trigger the overload conditions and made the
observations confirming the findings.

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_nocb.h