aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul E. McKenney <[email protected]>2022-05-18 17:19:27 -0700
committerPaul E. McKenney <[email protected]>2022-06-20 09:22:29 -0700
commit955a0192082023bf08f1be279182090264cb2557 (patch)
tree56dd73d3b6585655ef63ed9ee54f07b2982984f9
parentdc7d54b45170e1e3ced9f86718aa4274fd727790 (diff)
rcu-tasks: Stop RCU Tasks Trace from scanning idle tasks
Now that RCU scans both running tasks and tasks that have blocked within their current RCU Tasks Trace read-side critical section, there is no need for it to scan the idle tasks. After all, an idle loop should not be remain within an RCU Tasks Trace read-side critical section across exit from idle, and from a BPF viewpoint, functions invoked from the idle loop should not sleep. So only running idle tasks can be within RCU Tasks Trace read-side critical sections. This commit therefore removes the scan of the idle tasks from the rcu_tasks_trace_postscan() function. Signed-off-by: Paul E. McKenney <[email protected]> Cc: Neeraj Upadhyay <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: KP Singh <[email protected]>
-rw-r--r--kernel/rcu/tasks.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index d318cdfd2309..272c905995e5 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -1533,16 +1533,10 @@ static void rcu_tasks_trace_pregp_step(struct list_head *hop)
}
/*
- * Do intermediate processing between task and holdout scans and
- * pick up the idle tasks.
+ * Do intermediate processing between task and holdout scans.
*/
static void rcu_tasks_trace_postscan(struct list_head *hop)
{
- int cpu;
-
- for_each_online_cpu(cpu)
- rcu_tasks_trace_pertask(idle_task(cpu), hop);
-
// Re-enable CPU hotplug now that the tasklist scan has completed.
cpus_read_unlock();