* [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
@ 2025-04-23 20:26 Kevin Mitchell
2025-04-24 9:23 ` Petr Mladek
2025-05-01 21:51 ` Guilherme G. Piccoli
0 siblings, 2 replies; 3+ messages in thread
From: Kevin Mitchell @ 2025-04-23 20:26 UTC (permalink / raw)
To: Guilherme G . Piccoli
Cc: Kevin Mitchell, Petr Mladek, Jani Nikula, Andrew Morton,
John Ogness, Greg Kroah-Hartman, Ryo Takakura, Joel Granados,
Jocelyn Falempe, linux-kernel
On panic, the backtrace of the panicking CPU will be printed either from
within panic() itself or by the oops handling. Previously, when
PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU
would be printed again.
To avoid cluttering up the crash log or console with this redundant
information, this commit omits the panicking CPU from the all-cpu
backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT.
Signed-off-by: Kevin Mitchell <kevmitch@arista.com>
---
kernel/panic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index a3889f38153d..e53b23449fcf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -258,7 +258,7 @@ static void panic_other_cpus_shutdown(bool crash_kexec)
if (panic_print & PANIC_PRINT_ALL_CPU_BT) {
/* Temporary allow non-panic CPUs to write their backtraces. */
panic_triggering_all_cpu_backtrace = true;
- trigger_all_cpu_backtrace();
+ trigger_allbutcpu_cpu_backtrace(raw_smp_processor_id());
panic_triggering_all_cpu_backtrace = false;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
2025-04-23 20:26 [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT Kevin Mitchell
@ 2025-04-24 9:23 ` Petr Mladek
2025-05-01 21:51 ` Guilherme G. Piccoli
1 sibling, 0 replies; 3+ messages in thread
From: Petr Mladek @ 2025-04-24 9:23 UTC (permalink / raw)
To: Kevin Mitchell
Cc: Guilherme G . Piccoli, Jani Nikula, Andrew Morton, John Ogness,
Greg Kroah-Hartman, Ryo Takakura, Joel Granados, Jocelyn Falempe,
linux-kernel
On Wed 2025-04-23 13:26:17, Kevin Mitchell wrote:
> On panic, the backtrace of the panicking CPU will be printed either from
> within panic() itself or by the oops handling. Previously, when
> PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU
> would be printed again.
>
> To avoid cluttering up the crash log or console with this redundant
> information, this commit omits the panicking CPU from the all-cpu
> backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT.
>
> Signed-off-by: Kevin Mitchell <kevmitch@arista.com>
Makes sense. The patch looks good to me.
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
2025-04-23 20:26 [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT Kevin Mitchell
2025-04-24 9:23 ` Petr Mladek
@ 2025-05-01 21:51 ` Guilherme G. Piccoli
1 sibling, 0 replies; 3+ messages in thread
From: Guilherme G. Piccoli @ 2025-05-01 21:51 UTC (permalink / raw)
To: Kevin Mitchell
Cc: Petr Mladek, Jani Nikula, Andrew Morton, John Ogness,
Greg Kroah-Hartman, Ryo Takakura, Joel Granados, Jocelyn Falempe,
linux-kernel
On 23/04/2025 17:26, Kevin Mitchell wrote:
> On panic, the backtrace of the panicking CPU will be printed either from
> within panic() itself or by the oops handling. Previously, when
> PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU
> would be printed again.
>
> To avoid cluttering up the crash log or console with this redundant
> information, this commit omits the panicking CPU from the all-cpu
> backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT.
>
> Signed-off-by: Kevin Mitchell <kevmitch@arista.com>
> ---
> kernel/panic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Makes total sense - thanks for the improvement!
Feel free to add my:
Reviewed-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Cheers!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-01 21:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 20:26 [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT Kevin Mitchell
2025-04-24 9:23 ` Petr Mladek
2025-05-01 21:51 ` Guilherme G. Piccoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox