From: Wim Van Sebroeck <wim@iguana.be>
To: Giel van Schijndel <me@mortis.eu>
Cc: Lutz Ballaschke <vegan.grindcore@googlemail.com>,
Wim van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 0/3] watchdog: add f71862fg support
Date: Sat, 2 Oct 2010 14:33:09 +0200 [thread overview]
Message-ID: <20101002123308.GG3823@infomag.iguana.be> (raw)
In-Reply-To: <20100926151155.GB7185@salidar.me.mortis.eu>
Hi all,
> On Sun, Sep 26, 2010 at 04:06:29PM +0200, Lutz Ballaschke wrote:
> > Furthermore i was thinking about modifying the WDIOC_GETTIMELEFT
> > helper function since it simply returns the content of the WDT timer
> > register without regarding whether the driver runs in minute-mode or not
> > (thanks to Giel for pointing that out). This means if the driver is loaded
> > with a timeout of >255 seconds (and switches to minute-mode) WDIOC_GETTIMELEFT
> > ioctl returns minutes instead of seconds and thus doesn't comply with
> > watchdog-api (e.g. ioctl returns 6(min) not 360(sec)). It might be
> > confusing if one loads the driver with a timeout of let's say 360 seconds
> > and gets 6 minutes returned by ioctl. But imho it's not very accurate to
> > return a value of seconds if the wdt doesn't count in seconds. That might
> > be even more confusing. This inconsistency on the part of the hardware
> > maybe can't get satisfyingly compensated by the driver. So i'd prefer the
> > most simple solution.
>
> IMO the worst option would be to just return minutes. Returning
> 'minutes * 60 = seconds' would be significantly less bad. So if these
> are your options I'd suggest going with the lesser evil.
>
> One other possible option could be returning '(minutes - 1) * 60 + 1'.
> That way bad timing decisions based on the (wrong) assumption, that
> there are still 60 seconds left until reset, can be averted.
>
> I would however like Wim's opinion on this, as this affects the
> Watchdog API's usage.
The return value should be the seconds before the watchdog will reboot.
So value should be seconds, not minutes and is best the safest value
(so (minutes - 1) * 60 + 1 in this case ).
Secondly: the WDIOC_GETTIMELEFT should only be a DEBUGging ioctl.
The reason I created it, is to check if certain drivers are working
or not. We should not use it in normal operations imho.
Kind regards,
Wim.
next prev parent reply other threads:[~2010-10-02 12:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 14:06 [PATCHv3 0/3] watchdog: add f71862fg support Lutz Ballaschke
2010-09-26 15:11 ` Giel van Schijndel
2010-10-02 12:33 ` Wim Van Sebroeck [this message]
2010-11-19 19:49 Lutz Ballaschke
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=20101002123308.GG3823@infomag.iguana.be \
--to=wim@iguana.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=me@mortis.eu \
--cc=vegan.grindcore@googlemail.com \
/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).