Re: [PATCH 1/3] rcu: Replace magic number with meaningful constant in rcu_seq_done_exact()

From: Paul E. McKenney
Date: Wed Apr 02 2025 - 00:25:30 EST


On Tue, Apr 01, 2025 at 03:38:21PM +0200, Frederic Weisbecker wrote:
> Le Mon, Mar 31, 2025 at 02:29:52PM -0700, Paul E. McKenney a écrit :
> > The disagreement is a feature, at least up to a point. That feature
> > allows CPUs to go idle for long periods without RCU having to bother
> > them or to mess with their per-CPU data (give or take ->gpwrap). It also
> > allows per-rcu_node-leaf locking, which is important on large systems.
> >
> > Trying to make precisely globally agreed-on beginnings and ends of
> > RCU grace periods will not end well from performance, scalability,
> > or real-time-response viewpoints. ;-)
>
> The distributed disagreement is definetly a feature. The duplicate root
> is more debatable.
>
> > But simplifications that don't hurt performance, scalability, and
> > real-time-response are of course welcome.
>
> I'm not even sure my proposal is a simplification. Perhaps it is. Another
> hope is that it could avoid future accidents.
>
> > Indeed, this probably needs actual performance results showing that
> > it is needed. My guess is that only systems with a single rcu_node
> > structure that is both leaf and root would have any chance of noticing.
> > And those tend to have few CPUs, so they might not care.
>
> Do you have any idea for a benchmark to test here?

The best that I can come up with is hammering with a combination of
expedited grace periods and polled grace periods.

Thanx, Paul