linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: anish singh <anish198519851985@gmail.com>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	linux-watchdog@vger.kernel.org,
	linux-kernel-mail <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC]Watchdog:core: constant pinging until userspace timesout when delay very less
Date: Mon, 3 Jun 2013 15:25:14 -0700	[thread overview]
Message-ID: <20130603222514.GA9082@roeck-us.net> (raw)
In-Reply-To: <CAK7N6vrO4yFmEDotNnneG8EFgYOND9_iOXV5LnTPdCW0CMO10A@mail.gmail.com>

On Mon, Jun 03, 2013 at 10:23:04PM +0530, anish singh wrote:
> On Mon, Jun 3, 2013 at 8:57 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > On Sun, Jun 02, 2013 at 03:43:07PM +0530, anish kumar wrote:
> >> Certain watchdog drivers use a timer to keep kicking the watchdog at
> >> a rate of 0.5s (HZ/2) untill userspace times out.They do this as
> >> we can't guarantee that watchdog will be pinged fast enough
> >> for all system loads, especially if timeout is configured for
> >> less than or equal to 1 second(basically small values).
> >>
> >> As suggested by Wim Van Sebroeck & Guenter Roeck we should
> >> add this functionality of individual watchdog drivers in the core
> >> watchdog core.
> >>
> >> Signed-off-by: anish kumar <anish198519851985@gmail.com>
> >
> > Not exactly what I had in mind. My idea was to enable the softdog only if
> > the hardware watchdog's maximum timeout was low (say, less than a couple
> > of minutes), and if a timeout larger than its maximum value was configured.
> 
> watchdog_timeout_invalid wouldn't this check will fail if the user space tries
> to set maximum timeout more that what driver can support?It would work
> for pika_wdt.c as it is old watchdog driver and doesn't register with watchdog
> framwork but new drivers has to pass this api.
> 
> OR
> 
> Do you want to remove this check and go as explained by you?I would
> favour this approach though.
> 
One would still have a check, but the enforced limits would no longer be
the driver limits, but larger limits implemented in the watchdog core.

> > In that case, I would have set the hardware watchdog to its maximum value
> > and use the softdog to ping it at a rate of, say, 50% of this maximum.
> >
> > If userspace would not ping the watchdog within its configured value,
> > I would stop pinging the hardware watchdog and let it time out.
> 
> One more question.Why is the return value of watchdog_ping int? Anyway
> we discard it.

I can not answer that question.

Guenter

  reply	other threads:[~2013-06-03 22:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 10:13 [PATCH] [RFC]Watchdog:core: constant pinging until userspace timesout when delay very less anish kumar
2013-06-02 10:26 ` anish singh
2013-06-03 14:38   ` anish singh
2013-06-03 15:27 ` Guenter Roeck
2013-06-03 16:53   ` anish singh
2013-06-03 22:25     ` Guenter Roeck [this message]
2013-06-04  3:09       ` anish singh
2013-06-05  3:09         ` anish singh
2013-06-06  3:00           ` anish singh
2013-06-06  4:41             ` Guenter Roeck
2013-06-08 13:14               ` anish singh
2013-06-27 19:31 ` Wim Van Sebroeck
2013-06-28  3:31   ` anish singh

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=20130603222514.GA9082@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=anish198519851985@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).