rcu-tasks: Flag offline CPUs in RCU Tasks Trace stall warnings
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 25 May 2022 03:36:08 +0000 (20:36 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:28 +0000 (09:22 -0700)
This commit tags offline CPUs with "(offline)" in RCU Tasks Trace CPU
stall warnings.  This is a debugging aid.

Signed-off-by: Paul 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>
kernel/rcu/tasks.h

index 1cfbebf2b5977b31406698f4c80adddee47e8f01..93096188d3631ada4558093adbabc4b3c05c7e63 100644 (file)
@@ -1502,14 +1502,14 @@ static void show_stalled_task_trace(struct task_struct *t, bool *firstreport)
                         ".I"[t->trc_ipi_to_cpu >= 0],
                         ".i"[is_idle_tsk]);
        else
-               pr_alert("P%d: %c%c%c nesting: %d%c cpu: %d\n",
+               pr_alert("P%d: %c%c%c nesting: %d%c cpu: %d%s\n",
                         t->pid,
                         ".I"[trc_rdr.ipi_to_cpu >= 0],
                         ".i"[is_idle_tsk],
                         ".N"[cpu >= 0 && tick_nohz_full_cpu(cpu)],
                         trc_rdr.nesting,
                         " N"[!!trc_rdr.needqs],
-                        cpu);
+                        cpu, cpu_online(cpu) ? "" : "(offline)");
        sched_show_task(t);
 }