From: Paul E. McKenney Date: Fri, 22 Nov 2024 08:47:08 +0000 (-0800) Subject: rcu-tasks: Idle tasks on offline CPUs are in quiescent states X-Git-Tag: v5.15.174~493 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b661948bac8675e87a020ccca35870b007a31525;p=thirdparty%2Fkernel%2Fstable.git rcu-tasks: Idle tasks on offline CPUs are in quiescent states commit 5c9a9ca44fda41c5e82f50efced5297a9c19760d upstream. Any idle task corresponding to an offline CPU is in an RCU Tasks Trace quiescent state. This commit causes rcu_tasks_trace_postscan() to ignore idle tasks for offline CPUs, which it can do safely due to CPU-hotplug operations being disabled. Signed-off-by: Paul E. McKenney Cc: Neeraj Upadhyay Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: KP Singh Signed-off-by: Krister Johansen Signed-off-by: Sasha Levin --- diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 0e50ec9ded86e..0a83d0ce46d78 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -1090,7 +1090,7 @@ static void rcu_tasks_trace_postscan(struct list_head *hop) { int cpu; - for_each_possible_cpu(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.