Re: [PATCH -rcu dev 1/2] Revert b8c17e6664c4 ("rcu: Maintain special bits at bottom of ->dynticks counter")
From: Joel Fernandes
Date: Fri Sep 06 2019 - 11:08:10 EST
On Thu, Sep 05, 2019 at 08:01:37PM -0400, Joel Fernandes wrote:
> > > > @@ -3004,7 +3007,7 @@ static int rcu_pending(void)
> > > > return 0;
> > > >
> > > > /* Is the RCU core waiting for a quiescent state from this CPU? */
> > > > - if (rdp->core_needs_qs && !rdp->cpu_no_qs.b.norm)
> > > > + if (READ_ONCE(rdp->core_needs_qs) && !rdp->cpu_no_qs.b.norm)
> > > > return 1;
> > > >
> > > > /* Does this CPU have callbacks ready to invoke? */
> > > > @@ -3244,7 +3247,6 @@ int rcutree_prepare_cpu(unsigned int cpu)
> > > > rdp->gp_seq = rnp->gp_seq;
> > > > rdp->gp_seq_needed = rnp->gp_seq;
> > > > rdp->cpu_no_qs.b.norm = true;
> > > > - rdp->core_needs_qs = false;
> > >
> > > How about calling the new hint-clearing function here as well? Just for
> > > robustness and consistency purposes?
> > This and the next function are both called during a CPU-hotplug online
> > operation, so there is little robustness or consistency to be had by
> > doing it twice.
> Ok, sorry I missed you are clearing it below in the next function. That's
> fine with me.
> This patch looks good to me and I am Ok with merging of these changes into
> the original patch with my authorship as you mentioned. Or if you wanted to
> be author, that's fine too :)
Paul, does it make sense to clear these urgency hints in rcu_qs() as well?
After all, we are clearing atleast one urgency hint there: the