rcu-tasks: Add blocked-task indicator to RCU Tasks Trace stall warnings
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 17 May 2022 23:47:40 +0000 (16:47 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:29 +0000 (09:22 -0700)
This commit adds a "B" indicator to the RCU Tasks Trace CPU stall warning
when the task has blocked within its current read-side critical section.
This serves as 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 eb87a759ef0b045545fc967ea1742c48dd066c51..6f4b89f9517ef57a71ac768565a52e2ce664c162 100644 (file)
@@ -1536,11 +1536,12 @@ 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%c cpu: %d%s\n",
+               pr_alert("P%d: %c%c%c%c nesting: %d%c%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)],
+                        ".B"[!!data_race(t->trc_reader_special.b.blocked)],
                         trc_rdr.nesting,
                         " !CN"[trc_rdr.needqs & 0x3],
                         " ?"[trc_rdr.needqs > 0x3],