Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2011 20:03:08 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Arnaud Lacombe <lacombar@gmail.com>
Cc:        FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   Re: Very imprecise watchdogd(8) timeout
Message-ID:  <58772.1316203388@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 16 Sep 2011 15:51:56 -0400." <CACqU3MWs0HHnZchOwmwWG8U9Vd2pBDKAqf6Pdw5zS_XO_S6Ppw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <CACqU3MWs0HHnZchOwmwWG8U9Vd2pBDKAqf6Pdw5zS_XO_S6Ppw@mail.gmail.com>
, Arnaud Lacombe writes:

>I just had a look to the way the timeout specified to watchdogd is
>passed to the kernel. watchdogd(8) says:

The API was designed for simplicity, not precision.

Watchdog hardware often have weird and strange limitations on the
actual values you can set.

A very typical, the most typical in my experience, is "some
frequency, a binary prescaler, possibly with a counter.

It is also not uncommon to have more than one watchdog
mechanism in the same system.

It would be overkill to design and implement a complex API to
communicate these limitations to userland.

So the API was designed around the power-of-two scale to give it
a wide range, and with the semantics "no shorter than", to make
it easy to use, and for multiple watchdogs to be engaged to the
best of their ability.

If this is not precise enough for you, come up with something
better.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58772.1316203388>