Thread (5 messages) 5 messages, 2 authors, 3d ago

Re: [PATCH 1/1] powerpc/crash: stop watchdogs before booting kdump kernel

From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Date: 2026-07-11 03:32:12
Also in: stable

Sourabh Jain [off-list ref] writes:
quoted
Looking at the code, we already have a mechanism to register a crash
shutdown handler which anyways is getting called from
default_machine_crash_shutdown(). So, I think we could use this generic
crash handler register mechanism and keep the wdt specific calls within
pseries/setup.c file...
That's a good idea. I wasn't aware of this crash handler.

The main reason I wanted to stop the watchdog as soon as the kernel
enters the architecture-specific crash code is that, on PowerPC, the
crash path sends IPIs to all other CPUs and waits for their response
before continuing. Because of this, I thought it would be better to
stop the watchdog as early as possible.

I knew there was an IPI timeout, but I just checked and it's set to
10 seconds. See crash_kexec_prepare_cpus() in crash.c.
That's just the max worst case timeout value, which is unlikely to be
hit. FWIW, the watchdog timeout value in the example usage for
sbd.8.pod.in file seems to be 15sec.
The crash handler is called after the IPI wait. So, in theory, the watchdog
timeout could occur before the IPI timeout. But I think that's a very 
unlikely
scenario, though.
I agree.
So I think disabling the watchdog from the crash handler
is a reasonable approach.

Please share your thoughts.
yup! I agree, the crash handler looks to be a much better approach
since it avoids, hcall definitions scattered in common
powerpc/kexec/crash.c file. This also provides setjmp/longjmp for
recovering from any bogus exceptions during crash handling.

But we will know more when you will give it a try!

-ritesh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help