Sourabh Jain <[email protected]> writes:

>> 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

Reply via email to