From: Dave Young <dyoung@redhat.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: dzickus@redhat.com, bhe@redhat.com, vgoyal@redhat.com,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] watchdog: add a parameter for stop wdt before register
Date: Tue, 14 Jan 2014 16:41:54 +0800 [thread overview]
Message-ID: <20140114084154.GC3969@dhcp-16-126.nay.redhat.com> (raw)
In-Reply-To: <20140114082632.GA28648@spo001.leaseweb.com>
On 01/14/14 at 09:26am, Wim Van Sebroeck wrote:
> Hi Dave,
>
> > In kdump kernel watchdog could interrupt vmcore capturing because we
> > have no way to disable/stop it while crashing happens.
> >
> > 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.
> >
> > Don Zickus mentioned that there's the case that bios start the watchdog
> > and it is expected that the kernel keep the watchdog alive. To address
> > this case I added the module parameter which is false by default so
> > it will stop the watchdog only when user provice kernel cmdline
> > "watchdog.stop_before_register=1".
> >
> > Signed-off-by: Dave Young <dyoung@redhat.com>
> > ---
> > drivers/watchdog/watchdog_core.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > --- linux.orig/drivers/watchdog/watchdog_core.c
> > +++ linux/drivers/watchdog/watchdog_core.c
> > @@ -42,6 +42,7 @@
> >
> > static DEFINE_IDA(watchdog_ida);
> > static struct class *watchdog_class;
> > +static bool stop_before_register;
> >
> > static void watchdog_check_min_max_timeout(struct watchdog_device *wdd)
> > {
> > @@ -119,6 +120,9 @@ int watchdog_register_device(struct watc
> > if (wdd->ops->start == NULL || wdd->ops->stop == NULL)
> > return -EINVAL;
> >
> > + if (stop_before_register)
> > + wdd->ops->stop(wdd);
> > +
> > watchdog_check_min_max_timeout(wdd);
> >
> > /*
> > @@ -220,6 +224,8 @@ static void __exit watchdog_exit(void)
> > subsys_initcall(watchdog_init);
> > module_exit(watchdog_exit);
> >
> > +module_param(stop_before_register, bool, 0644);
> > +
> > MODULE_AUTHOR("Alan Cox <alan@lxorguk.ukuu.org.uk>");
> > MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>");
> > MODULE_DESCRIPTION("WatchDog Timer Driver Core");
>
> Hmm, need to look closer to this, but my first thought is:
> what about devices that cannot be stopped once started...
> They should be able to override this module_parameter...
Hi, Wim
Thanks for quick feedback!
I'm not sure the meaning of "cannot be stopped", if it means that
the policy that it should not be stopped, I think since the watchdog_core
is always built-in so the param can only be provided via boot cmdline it would
be fine?
For device which really *cannot* stop, the stop() will fail silently?
Thanks
Dave
next prev parent reply other threads:[~2014-01-14 8:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 8:23 Dave Young
2014-01-14 8:26 ` Wim Van Sebroeck
2014-01-14 8:41 ` Dave Young [this message]
2014-01-14 9:44 ` Dave Young
2014-01-14 12:16 ` One Thousand Gnomes
2014-01-14 16:24 ` Vivek Goyal
2014-01-15 1:11 ` Dave Young
2014-01-15 16:46 ` Vivek Goyal
2014-01-16 1:50 ` Dave Young
2014-01-15 0:59 ` Dave Young
2014-01-15 12:15 ` One Thousand Gnomes
2014-01-15 16:55 ` Vivek Goyal
2014-01-16 1:52 ` Dave Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140114084154.GC3969@dhcp-16-126.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=bhe@redhat.com \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=vgoyal@redhat.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®