Re: [PATCH 1/2] rcu/tree: Add a warning if CPU being onlined did not report QS already

From: Joel Fernandes
Date: Fri Aug 07 2020 - 11:45:33 EST


On Fri, Aug 07, 2020 at 11:37:32AM -0400, Joel Fernandes wrote:
> Hi Paul,
>
> On Thu, Jul 30, 2020 at 08:48:25PM -0700, Paul E. McKenney wrote:
> [...]
> > > And I could make the comment here as:
> > > /*
> > > * Delete QS reporting from here, by June 2021, if the warning does not
> > > * fire. Leave the warning indefinitely. Check RCU design requirements
> > > * in Documentation/RCU/ about CPU hotplug requirements.
> > > */
> >
> > Rather than decide for our future selves, could we please just suggest
> > reviewing this on June 2021? Or, given enterprise distro schedules,
> > 2024. :-/
>
> I am replacing it with the following, let me know if any objections, thanks:
>
> + * XXX: The following rcu_report_qs_rnp() is redundant. If the below
> + * warning does not fire, consider replacing it with the "else" block,
> + * by June 2021 or so. The rationale for this is as follows: The CPU
> + * onlining path does not need to report QS for an offline CPU. Either
> + * the QS should have reported during CPU offlining, or during
> + * rcu_gp_init() if it detected a race with either CPU offlining or
> + * task unblocking on previously offlined CPUs. To avoid deadlocks
> + * related to waiting on timers or cpu hotplug locks, only those paths
> + * do the QS reporting for offline CPUs.

And you did mention you still want the warn-on indefinitely, so I'll document
that in the comment as well.

Now it looks like:

/*
* XXX: The following rcu_report_qs_rnp() is redundant. If the below
* warning does not fire, consider replacing it with the "else" block,
* by June 2021 or so (while keeping the warning). The rationale for
* this is as follows: The CPU onlining path does not need to report QS
* for an offline CPU. Either the QS should have reported during CPU
* offlining, or during rcu_gp_init() if it detected a race with either
* CPU offlining or task unblocking on a node with all of its CPUs
* previously offlined. To avoid deadlocks related to waiting on
* timers or cpu hotplug locks, only these paths do the QS reporting
* for offline CPUs making the following reporting redundant.
*/

thanks,

- Joel

>
> thanks,
>
> - Joel
>
> >
> > Thanx, Paul
> >
> > > I will post my v3 with changes to the requirements document.
> > >
> > > Let me know any other comments, thanks,
> > >
> > > - Joel
> > >