rcu-tasks: Allow RCU-Task trace stall warning dump late IPI CPU stacks
PATCH 1/1 rcu-tasks: Allow RCU-Task trace stall warning dump late IPI CPU stacks
The task structure's->trc_ipi_to_cpu and percpu trc_ipi_to_cpu is used to record whether the IPI is completed, if the percpu trc_ipi_to_cpu is true and task structure's->trc_ipi_to_cpu is non-negative value, indicates that IPI is not completed, if the IPI is unresponsive for along time for some reason, there will be a possibility of causing RCU-Tasks trace stall. this commit therefore allow dump late IPI CPU stacks to show the path that current CPU is executing.
---
In the real world, the IPI delay will be very small, so the probability of triggering dump_cpu_stack() may be very low, so if I makes noise, please ignore it.
kernel/rcu/tasks.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
kernel/rcu/tasks.h +6 -1
@@ -1658,8 +1658,13 @@ static void show_stalled_ipi_trace(void)int cpu;for_each_possible_cpu (cpu) -if (per_cpu (trc_ipi_to_cpu, cpu)) +if (per_cpu (trc_ipi_to_cpu, cpu)) {pr_alert ("\tIPI outstanding to CPU %d\n" , cpu); +if (cpu_is_offline (cpu)) +pr_alert ("offline CPU %d blocking gp\n" , cpu); +else +dump_cpu_task (cpu); + } }/* Do one scan of the holdout list. */
Signature · 1 line
2.25.1
Quoted 28 lines
From: Zqiang <[email protected]>
Sent: Tuesday, February 21, 2023 12:32 PM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] rcu-tasks: Allow RCU-Task trace stall warning dump late IPI CPU stacksThe task structure's->trc_ipi_to_cpu and percpu
trc_ipi_to_cpuis used to record whether the IPI is completed, if the percputrc_ipi_to_cpuis true and task structure's->trc_ipi_to_cpu is non-negative value, indicates that IPI is not completed, if the IPI is unresponsive for along time for some reason, there will be a possibility of causing RCU-Tasks trace stall. this commit therefore allow dump late IPI CPU stacks to show the path that current CPU is executing.Signed-off-by Zqiang <[email protected]>---
In the real world, the IPI delay will be very small, so the probability of
triggeringdump_cpu_stack()may be very low, so if I makes noise, please ignore it.kernel/rcu/tasks.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)kernel/rcu/tasks.h index renamed from kernel/rcu/tasks.h +0
-0
baf7ec178155..85237fc1d0f0100644
kernel/rcu/tasks.h static void show_stalled_ipi_trace(void) · line 1666
Quoted 10 lines
kernel/rcu/tasks.h +5
-1@@ -1658,8 +1658,13 @@ static void show_stalled_ipi_trace(void)int cpu;for_each_possible_cpu (cpu) -if (per_cpu (trc_ipi_to_cpu, cpu)) +if (per_cpu (trc_ipi_to_cpu, cpu)) {pr_alert ("\tIPI outstanding to CPU %d\n" , cpu); +if (cpu_is_offline (cpu)) +pr_alert ("offline CPU %d blocking gp\n" , cpu); +else +dump_cpu_task (cpu);
check_all_holdout_tasks_trace() -> show_stalled_task_trace() has already showed the states/traces of tasks stalling the current RCU tasks trace GP. Perhaps we don't need to dump these tasks again here.
Quoted 6 lines
kernel/rcu/tasks.h +1
-1+ } }/* Do one scan of the holdout list. */ --2.25.1