Re: Very imprecise watchdogd(8) timeout

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Fri, 16 Sep 2011 20:03:08 +0000
In message <CACqU3MWs0HHnZchOwmwWG8U9Vd2pBDKAqf6Pdw5zS_XO_S6Ppw_at_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_at_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.
Received on Fri Sep 16 2011 - 18:03:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC