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:37:37 EST
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.
thanks,
- Joel
>
> Thanx, Paul
>
> > I will post my v3 with changes to the requirements document.
> >
> > Let me know any other comments, thanks,
> >
> > - Joel
> >