login
Header Space

 
 

Re: w83697hf_wdt.c stops watchdog on load

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pádraig <P@...>
Cc: Samuel Tardieu <sam@...>, <junker@...>, LKML <linux-kernel@...>
Date: Tuesday, March 11, 2008 - 4:22 pm

Hi Pádraig, Samuel,


Let's take a step back and look at the "API". The watchdog drivers in Linux
were developed when BIOSses only coped with the basic stuff. The API that
was created is basically the following:
* The watchdog device-driver loads your watchdog driver and does the
initialization of the watchdog and then enables user-space access via
/dev/watchdog.
* the userspace watchdog daemon then
	1) starts the watchdog by opening /dev/watchdog
	2) pings the watchdog (by writing to /dev/watchdog or by using a
	ioctl command on /dev/watchdog).
	3) stops the watchdog by closing the /dev/watchdog "device".

This means that the /dev/watchdog interface is the key in controlling the
watchdog driver. The default behaviour is and was that the watchdog does not
work/run. Why? Simply because the userspace daemon has to have control
over when the watchdog is started, stopped and pinged and also because you
don't want the system to reboot before the watchdog-userspace-daemon has been
activated. The system operator off-course can decide when he wants to start
the userspace watchdog daemon (before loading other processes or after the
web-server is up because it also monitors the web-server, ...).

Based on the above explanation and API, I can acknowledge that the normal
behaviour is that the watchdog device driver stops the watchdog when loaded.
(Please also bear in mind that certain watchdog devices can only be started
and not stopped).

So the driver has the correct behaviour.


In my opinion it should be the other way around: the default behaviour is to
stop the watchdog and to let userspace (the watchdog-daemon) control the
watchdog. So if we add a module parameter to take over the watchdog's
bios-setting, then the default behaviour should be to stop the watchdog and
add an option that takes the value from the bios.


Yes, almost all watchdog drivers do this. Do not forget that there are also watchdog
devices around that have a timeout/keepalive value from only a few seconds till
+-60 seconds. so waiting 4 minutes is not do-able for them.

Greetings,
Wim.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: w83697hf_wdt.c stops watchdog on load, Wim Van Sebroeck, (Tue Mar 11, 4:22 pm)
Re: w83697hf_wdt.c stops watchdog on load, Samuel Tardieu, (Tue Mar 11, 4:28 pm)
Re: w83697hf_wdt.c stops watchdog on load, Pádraig Brady, (Wed Mar 12, 7:54 am)
Re: w83697hf_wdt.c stops watchdog on load, Samuel Tardieu, (Wed Mar 12, 8:00 am)
Re: w83697hf_wdt.c stops watchdog on load, Wim Van Sebroeck, (Tue Mar 11, 5:09 pm)
speck-geostationary