Date: Thu, 20 Oct 2016 00:30:19 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Andriy Gapon <avg@FreeBSD.org>, freebsd-arch@FreeBSD.org Subject: Re: watchdog end-user interface Message-ID: <35f650cf-96ca-f3a8-0ee3-54a34dc95737@freebsd.org> In-Reply-To: <78d70638-6117-cb8d-032a-c84fb52c9708@FreeBSD.org> References: <ec3dfab5-c3bc-e9e5-181e-8c2704f60acd@FreeBSD.org> <7a74df08-b5d9-5629-b71e-b577d8876e5d@freebsd.org> <78d70638-6117-cb8d-032a-c84fb52c9708@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/20/16 12:06 AM, Andriy Gapon wrote: > On 20/10/2016 00:32, Alfred Perlstein wrote: >> >> On 10/19/16 4:09 AM, Andriy Gapon wrote: >>> I know that there are people thinking about improving our watchdog >>> infrastructure. Maybe it's time to discuss some ideas in public. >>> >>> I would like to start with discussing the end-user, or rather administrative, >>> interface to the watchdog system. >>> >>> watchdogd always had -t timeout option. >>> Not a too long time ago it has also grown a handful of new options: >>> --softtimeout >>> --softtimeout-action action >>> --pretimeout timeout >>> --pretimeout-action action >>> >>> I want to question if those options really belong to watchdogd. >>> When a watchdog timer expires that results in a system-wide action (like a >>> system reset). To me, that implies that there should be a single system-wide >>> configuration point. And I am not sure that the daemon is the best choice for >>> it. >>> >>> Personally I would prefer a sysctl interface for the following reasons: >>> - easier to change the configuration >>> - easier to query current values >>> - easier to signal that a value getting set may be different from a requested >>> value >>> >>> In my opinion, watchdogd should only be concerned with running a check action >>> and patting the dog(s). And, by extension, WDIOCPATPAT should not re-configure >>> the timeout, it should just reload the timers. >>> >> Please look at the Linux interface for watchdogs, it is pretty good and >> could/should be ported to us. > That's not what I actually wanted to discuss. > > Anyway, I had looked at it and I didn't find it a good model. > > I don't like that each watchdog driver creates its own device entry. > I prefer the FreeBSD model where all drivers can work in concert. > If the most popular Linux watchdog daemon is used, then you would need multiple > instances of it (watchdog or wd_keepalive) to use multiple drivers. > > I don't like the seconds resolution. It should be enough for everybody and, > hey, it's better than our power-of-two resolution in the most used range. > But I think that we could be even better. > > I do not like this (typical of Linux, I'd say): > The Linux watchdog API is a rather ad-hoc construction and different > drivers implement different, and sometimes incompatible, parts of it. > > There can be different opinions and different people can work towards different > goal. Personally, I do not have a goal of having Linux-like watchdog interface > on FreeBSD. > > References: > https://www.kernel.org/doc/Documentation/watchdog/watchdog-api.txt > https://www.kernel.org/doc/Documentation/watchdog/watchdog-kernel-api.txt > http://linux.die.net/man/5/watchdog.conf > https://sourceforge.net/p/watchdog/code/ci/master/tree/src/keep_alive.c?format=raw > http://www.sat.dundee.ac.uk/psc/watchdog/Linux-Watchdog.html ¯\_(ツ)_/¯
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35f650cf-96ca-f3a8-0ee3-54a34dc95737>