Thread (41 messages) 41 messages, 4 authors, 8h ago

Re: [PATCH v1 09/11] rcu: Detect expedited grace period completion in rcu_pending()

From: "Paul E. McKenney" <paulmck@kernel.org>
Date: 2026-07-21 14:32:08
Also in: lkml, rcu

On Tue, Jul 21, 2026 at 02:45:36PM +0200, Frederic Weisbecker wrote:
Le Wed, Jun 24, 2026 at 06:23:51AM -0700, Puranjay Mohan a écrit :
quoted
rcu_pending() decides whether rcu_core() should run on the current CPU's
timer tick.  It does not account for expedited grace periods: after an
expedited GP completes, a non-offloaded CPU's callbacks remain in
RCU_WAIT_TAIL (not yet advanced to RCU_DONE_TAIL) and rcu_core() is
never invoked to advance them.

Detect that case via rcu_segcblist_nextgp() combined with a new
memory-ordering-free poll variant,
poll_state_synchronize_rcu_full_unordered().  This keeps rcu_pending()
cheap: it runs on every tick that has pending callbacks, so it must
not pay for the two memory barriers in
poll_state_synchronize_rcu_full().  The check is only a hint to run
rcu_core(); the ordered re-check and the actual callback advancement
happen there.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Thank you!  I will apply this on my next rebase.

							Thanx, Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help