srcu: Expedite SRCU-fast grace periods
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 3 Jun 2025 20:49:53 +0000 (13:49 -0700)
committerNeeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
Wed, 16 Jul 2025 04:20:57 +0000 (09:50 +0530)
commit3aea745a2a82e8397d2f30326f0dcf5f375dd7c8
tree43a381402b19b806408a175a9743ad41ee2a708e
parent941ab0b369c983f7867de54c8579fd7f1676ee3c
srcu: Expedite SRCU-fast grace periods

Currently, SRCU-fast grace periods use synchronize_rcu() to provide the
needed ordering with readers, even given an expedited SRCU-fast grace
period, which isn't all that expedited.  This commit therefore instead
uses synchronize_rcu_expedited() if there is an expedited SRCU-fast
grace period in flight.

Of course, given an non-expedited SRCU-fast grace period blocked in
synchronize_rcu(), a later request for an expedited SRCU-fast grace
period will wait for that synchronize_rcu() to return before switching
to use of synchronize_rcu_expedited().  If this turns out to be a real
problem for a production workload, we can increase the complexity (but
likely also degrade the energy efficiency) to speed things up further.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
kernel/rcu/srcutree.c