Re: [PATCH] watchdog: add a parameter for stop wdt before register

From: Dave Young
Date: Tue Jan 14 2014 - 19:59:19 EST


On 01/14/14 at 12:16pm, One Thousand Gnomes wrote:
> On Tue, 14 Jan 2014 16:23:23 +0800
> Dave Young <dyoung@xxxxxxxxxx> wrote:
>
> > In kdump kernel watchdog could interrupt vmcore capturing because we
> > have no way to disable/stop it while crashing happens.
>
> Lots of watchdogs cannot be stopped.
>
> > Add a module parameter stop_before_register so watchdog can be stopped
> > before register in driver loading path. Thus we can try to load the
> > watchdog driver as early as possible in kdump kernel to ensure vmcore
> > capturing.
>
> If you want to kdump then don't start the watchdog. The goal of the
> watchdog is to make sure the system never gets stuck. Adding conditions
> and special cases simply increases the odds of something bad not
> triggering the watchdog.

watchdog and crash dump really conflicts to some degree, from the watchdog
point of view it can reboot system whhen kdump kernel hangs. But from kdump
point of view it want ensure saving the vmcore for later debugging.

Maybe we can only select only one in this case.
>
> If you have a system that can stop the watchdog then providing no way out
> is not set you can open it and stop it.
>
> I don't see the need for any kernel change here
>
> - if it can't be stopped you lost
> - if "nowayout" is set then by design you lost
> - if it can be stopped, you can open and stop it

For the last one since crashing happens we have no chance to open and stop.

>
> Now whether in the !nowayout case the watchdog core should catch whatever
> hooks/notifiers are available and stop any watchdogs it can on a
> kexec/kdump is a more interesting question and probably needs to default
> to not doing so but with the option to force otherwise for debugging work.

Unfortunately in crash path there's no chance to do so. It's not good to
add more logic in that path as well.

Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/