Very imprecise watchdogd(8) timeout
Arnaud Lacombe
lacombar at gmail.com
Fri Sep 16 19:51:58 UTC 2011
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
More information about the freebsd-current
mailing list