Message ID | 20240430091740.1826862-18-vschneid@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | context_tracking, rcu: Spring cleaning renaming | expand |
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@redhat.com> > --- > 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 > */ > -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. Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
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@redhat.com> >> --- >> 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. > Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
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@redhat.com> > >> --- > >> 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@kernel.org> >
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). */ -static bool rcu_dynticks_in_eqs(int snap) +static bool rcu_watching_in_eqs(int snap) { return !(snap & CT_RCU_WATCHING); } @@ -771,7 +771,7 @@ static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp) static int dyntick_save_progress_counter(struct rcu_data *rdp) { rdp->dynticks_snap = rcu_watching_snap(rdp->cpu); - if (rcu_dynticks_in_eqs(rdp->dynticks_snap)) { + if (rcu_watching_in_eqs(rdp->dynticks_snap)) { trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti")); rcu_gpnum_ovf(rdp->mynode, rdp); return 1; @@ -4798,7 +4798,7 @@ rcu_boot_init_percpu_data(int cpu) rdp->grpmask = leaf_node_cpu_bit(rdp->mynode, cpu); INIT_WORK(&rdp->strict_work, strict_work_handler); WARN_ON_ONCE(ct->nesting != 1); - WARN_ON_ONCE(rcu_dynticks_in_eqs(rcu_watching_snap(cpu))); + WARN_ON_ONCE(rcu_watching_in_eqs(rcu_watching_snap(cpu))); rdp->barrier_seq_snap = rcu_state.barrier_sequence; rdp->rcu_ofl_gp_seq = rcu_state.gp_seq; rdp->rcu_ofl_gp_state = RCU_GP_CLEANED; diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 50ec57304c1b7..68dea1427c8bd 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -358,7 +358,7 @@ static void __sync_rcu_exp_select_node_cpus(struct rcu_exp_work *rewp) mask_ofl_test |= mask; } else { snap = rcu_watching_snap(cpu); - if (rcu_dynticks_in_eqs(snap)) + if (rcu_watching_in_eqs(snap)) mask_ofl_test |= mask; else rdp->exp_dynticks_snap = snap; diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 4fa23f9fc207f..589f1be8ff921 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -501,7 +501,7 @@ static void print_cpu_stall_info(int cpu) } delta = rcu_seq_ctr(rdp->mynode->gp_seq - rdp->rcu_iw_gp_seq); falsepositive = rcu_is_gp_kthread_starving(NULL) && - rcu_dynticks_in_eqs(rcu_watching_snap(cpu)); + rcu_watching_in_eqs(rcu_watching_snap(cpu)); rcuc_starved = rcu_is_rcuc_kthread_starving(rdp, &j); if (rcuc_starved) // Print signed value, as negative values indicate a probable bug.
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@redhat.com> --- kernel/rcu/tree.c | 8 ++++---- kernel/rcu/tree_exp.h | 2 +- kernel/rcu/tree_stall.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)