Re: [PATCH v2 17/27] rcu: Rename rcu_dynticks_in_eqs() into rcu_watching_in_eqs()

From: Frederic Weisbecker
Date: Wed May 08 2024 - 06:46:57 EST


Le Tue, May 07, 2024 at 05:48:12PM +0200, Valentin Schneider a écrit :
> On 07/05/24 15:32, Frederic Weisbecker wrote:
> > Le Tue, Apr 30, 2024 at 11:17:21AM +0200, Valentin Schneider a écrit :
> >> The context_tracking.state RCU_DYNTICKS subvariable has been renamed to
> >> RCU_WATCHING, reflect that change in the related helpers.
> >>
> >> Signed-off-by: Valentin Schneider <vschneid@xxxxxxxxxx>
> >> ---
> >> kernel/rcu/tree.c | 8 ++++----
> >> kernel/rcu/tree_exp.h | 2 +-
> >> kernel/rcu/tree_stall.h | 2 +-
> >> 3 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> >> index 857c2565efeac..d772755ccd564 100644
> >> --- a/kernel/rcu/tree.c
> >> +++ b/kernel/rcu/tree.c
> >> @@ -308,9 +308,9 @@ static int rcu_watching_snap(int cpu)
> >>
> >> /*
> >> * Return true if the snapshot returned from rcu_watching_snap()
> >> - * indicates that RCU is in an extended quiescent state.
> >> + * indicates that RCU in an extended quiescent state (not watching).
> >
> > *is in
> >
>
> Oh, thanks!
>
> >> */
> >> -static bool rcu_dynticks_in_eqs(int snap)
> >> +static bool rcu_watching_in_eqs(int snap)
> >
> > I would be tempted to propose rcu_watching_snap_in_eqs() but the
> > purpose is not to dissuade people from intoning RCU code after all.
> >
>
> I've struggled with finding something sensible for the snapshot helpers; I
> think I prefer your suggestion, that way we can have a common prefix for
> all snapshot-related helpers. Also I keep reading rcu_watching_in_eqs() as
> "is RCU watching while being in EQS?" which is nonsense.

Works for me!

Thanks.

>
> > Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
>