Re: [tip/core/rcu, 05/21] rcu: Make rcu_gp_cleanup() more accurately predict need for new GP

From: Joel Fernandes
Date: Thu May 10 2018 - 13:38:01 EST


On Thu, May 10, 2018 at 06:15:46AM -0700, Paul E. McKenney wrote:
[...]
> > Also in rcu_future_gp_cleanup, we call:
> > trace_rcu_future_gp(rnp, rdp, c,
> > needmore ? TPS("CleanupMore") : TPS("Cleanup"));
> > For this case, in the final trace event record, rnp->completed and c will be
> > the same, since c is set to rnp->completed before calling
> > trace_rcu_future_gp. I was thinking they should be different, do you expect
> > them to be the same?
>
> Hmmm... That does look a bit inconsistent. And it currently uses
> rnp->gp_seq instead of rnp->gp_seq_needed despite having the same
> "CleanupMore" name.
>
> Looks like a review of the calls to trace_rcu_this_gp() is in order.

I see you changed trace_rcu_future_gp to use trace_rcu_this_gp in 15/21.. I
am not sure if the concern is still valid then since you seem to be correctly
getting the future GP in those cases, except for the naming which I suggest
be changed from 'c' to 'future_gp' just for clarity / self-documenting code.

thanks,

- Joel