Commit a9fde9d1 authored by Valentin Schneider's avatar Valentin Schneider Committed by Neeraj Upadhyay

context_tracking, rcu: Rename ct_dynticks_cpu() into ct_rcu_watching_cpu()

The context_tracking.state RCU_DYNTICKS subvariable has been renamed to
RCU_WATCHING, reflect that change in the related helpers.
Signed-off-by: default avatarValentin Schneider <vschneid@redhat.com>
Reviewed-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Signed-off-by: default avatarNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
parent a4a7921e
...@@ -61,7 +61,7 @@ static __always_inline int ct_rcu_watching(void) ...@@ -61,7 +61,7 @@ static __always_inline int ct_rcu_watching(void)
return atomic_read(this_cpu_ptr(&context_tracking.state)) & CT_RCU_WATCHING_MASK; return atomic_read(this_cpu_ptr(&context_tracking.state)) & CT_RCU_WATCHING_MASK;
} }
static __always_inline int ct_dynticks_cpu(int cpu) static __always_inline int ct_rcu_watching_cpu(int cpu)
{ {
struct context_tracking *ct = per_cpu_ptr(&context_tracking, cpu); struct context_tracking *ct = per_cpu_ptr(&context_tracking, cpu);
......
...@@ -335,14 +335,14 @@ bool rcu_dynticks_zero_in_eqs(int cpu, int *vp) ...@@ -335,14 +335,14 @@ bool rcu_dynticks_zero_in_eqs(int cpu, int *vp)
int snap; int snap;
// If not quiescent, force back to earlier extended quiescent state. // If not quiescent, force back to earlier extended quiescent state.
snap = ct_dynticks_cpu(cpu) & ~CT_RCU_WATCHING; snap = ct_rcu_watching_cpu(cpu) & ~CT_RCU_WATCHING;
smp_rmb(); // Order ->dynticks and *vp reads. smp_rmb(); // Order CT state and *vp reads.
if (READ_ONCE(*vp)) if (READ_ONCE(*vp))
return false; // Non-zero, so report failure; return false; // Non-zero, so report failure;
smp_rmb(); // Order *vp read and ->dynticks re-read. smp_rmb(); // Order *vp read and CT state re-read.
// If still in the same extended quiescent state, we are good! // If still in the same extended quiescent state, we are good!
return snap == ct_dynticks_cpu(cpu); return snap == ct_rcu_watching_cpu(cpu);
} }
/* /*
...@@ -4805,7 +4805,7 @@ rcu_boot_init_percpu_data(int cpu) ...@@ -4805,7 +4805,7 @@ rcu_boot_init_percpu_data(int cpu)
rdp->grpmask = leaf_node_cpu_bit(rdp->mynode, cpu); rdp->grpmask = leaf_node_cpu_bit(rdp->mynode, cpu);
INIT_WORK(&rdp->strict_work, strict_work_handler); INIT_WORK(&rdp->strict_work, strict_work_handler);
WARN_ON_ONCE(ct->dynticks_nesting != 1); WARN_ON_ONCE(ct->dynticks_nesting != 1);
WARN_ON_ONCE(rcu_dynticks_in_eqs(ct_dynticks_cpu(cpu))); WARN_ON_ONCE(rcu_dynticks_in_eqs(ct_rcu_watching_cpu(cpu)));
rdp->barrier_seq_snap = rcu_state.barrier_sequence; rdp->barrier_seq_snap = rcu_state.barrier_sequence;
rdp->rcu_ofl_gp_seq = rcu_state.gp_seq; rdp->rcu_ofl_gp_seq = rcu_state.gp_seq;
rdp->rcu_ofl_gp_state = RCU_GP_CLEANED; rdp->rcu_ofl_gp_state = RCU_GP_CLEANED;
......
...@@ -501,7 +501,7 @@ static void print_cpu_stall_info(int cpu) ...@@ -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); delta = rcu_seq_ctr(rdp->mynode->gp_seq - rdp->rcu_iw_gp_seq);
falsepositive = rcu_is_gp_kthread_starving(NULL) && falsepositive = rcu_is_gp_kthread_starving(NULL) &&
rcu_dynticks_in_eqs(ct_dynticks_cpu(cpu)); rcu_dynticks_in_eqs(ct_rcu_watching_cpu(cpu));
rcuc_starved = rcu_is_rcuc_kthread_starving(rdp, &j); rcuc_starved = rcu_is_rcuc_kthread_starving(rdp, &j);
if (rcuc_starved) if (rcuc_starved)
// Print signed value, as negative values indicate a probable bug. // Print signed value, as negative values indicate a probable bug.
...@@ -515,7 +515,7 @@ static void print_cpu_stall_info(int cpu) ...@@ -515,7 +515,7 @@ static void print_cpu_stall_info(int cpu)
rdp->rcu_iw_pending ? (int)min(delta, 9UL) + '0' : rdp->rcu_iw_pending ? (int)min(delta, 9UL) + '0' :
"!."[!delta], "!."[!delta],
ticks_value, ticks_title, ticks_value, ticks_title,
ct_dynticks_cpu(cpu) & 0xffff, ct_rcu_watching_cpu(cpu) & 0xffff,
ct_dynticks_nesting_cpu(cpu), ct_dynticks_nmi_nesting_cpu(cpu), ct_dynticks_nesting_cpu(cpu), ct_dynticks_nmi_nesting_cpu(cpu),
rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
data_race(rcu_state.n_force_qs) - rcu_state.n_force_qs_gpstart, data_race(rcu_state.n_force_qs) - rcu_state.n_force_qs_gpstart,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment