Re: [PATCH v1 09/11] rcu: Detect expedited grace period completion in rcu_pending()
"Paul E. McKenney" <[email protected]> Tue, 21 Jul 2026 07:32:07 -0700
| Newsgroups | org.kernel.vger.rcu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-trace-kernel |
|---|---|
| Message-ID | <d2eca500-344d-49ed-8731-edbc8a090fce@paulmck-laptop> |
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 : > > 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 <[email protected]> > > Reviewed-by: Frederic Weisbecker <[email protected]> Thank you! I will apply this on my next rebase. Thanx, Paul