Very imprecise watchdogd(8) timeout

From: Arnaud Lacombe <lacombar_at_gmail.com>
Date: Fri, 16 Sep 2011 15:51:56 -0400
Hi,

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

     The -t timeout specifies the desired timeout period in seconds.  The
     default timeout is 16 seconds.

So as a dumb user, I would expect `-t 30' to set the timeout to 30s.
You can imagine my surprise when the watchdog ends up being set to
34s, result of the convoluted conversion from double to integer from
the log base 2 of the timeout converted to nanosecond. That's more
than 10% of error on this timeout to what the manual page says it
would, and at the end, you can only set the watchdog to 62 different
value.

Folks, I'm definitively not impressed...

 - Arnaud
Received on Fri Sep 16 2011 - 17:51:58 UTC

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