Commit 1fa98e2e authored by Paul E. McKenney's avatar Paul E. McKenney

rcu-tasks: Move rcu_tasks_trace_pertask() before rcu_tasks_trace_pregp_step()

This is a code-motion-only commit that moves rcu_tasks_trace_pertask()
to precede rcu_tasks_trace_pregp_step(), so that the latter will be
able to invoke the other without forward references.
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: KP Singh <kpsingh@kernel.org>
parent 387c0ad7
...@@ -1449,20 +1449,6 @@ static void trc_wait_for_one_reader(struct task_struct *t, ...@@ -1449,20 +1449,6 @@ static void trc_wait_for_one_reader(struct task_struct *t,
} }
} }
/* Initialize for a new RCU-tasks-trace grace period. */
static void rcu_tasks_trace_pregp_step(void)
{
int cpu;
// There shouldn't be any old IPIs, but...
for_each_possible_cpu(cpu)
WARN_ON_ONCE(per_cpu(trc_ipi_to_cpu, cpu));
// Disable CPU hotplug across the tasklist scan.
// This also waits for all readers in CPU-hotplug code paths.
cpus_read_lock();
}
/* Do first-round processing for the specified task. */ /* Do first-round processing for the specified task. */
static void rcu_tasks_trace_pertask(struct task_struct *t, static void rcu_tasks_trace_pertask(struct task_struct *t,
struct list_head *hop) struct list_head *hop)
...@@ -1478,6 +1464,20 @@ static void rcu_tasks_trace_pertask(struct task_struct *t, ...@@ -1478,6 +1464,20 @@ static void rcu_tasks_trace_pertask(struct task_struct *t,
trc_wait_for_one_reader(t, hop); trc_wait_for_one_reader(t, hop);
} }
/* Initialize for a new RCU-tasks-trace grace period. */
static void rcu_tasks_trace_pregp_step(void)
{
int cpu;
// There shouldn't be any old IPIs, but...
for_each_possible_cpu(cpu)
WARN_ON_ONCE(per_cpu(trc_ipi_to_cpu, cpu));
// Disable CPU hotplug across the tasklist scan.
// This also waits for all readers in CPU-hotplug code paths.
cpus_read_lock();
}
/* /*
* Do intermediate processing between task and holdout scans and * Do intermediate processing between task and holdout scans and
* pick up the idle tasks. * pick up the idle tasks.
......
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