From: Valdis.Kletnieks at vt.edu <hidden> Date: 2013-12-03 22:31:20
On Tue, 03 Dec 2013 13:15:32 -0800, Vipul Jain said:
currently we configure/pet the watchdog from user space via /dev/ipmi0
device interface and I would like to do the pet part from kernel module.
That's actually defeating the purpose. If you do it from the kernel,
you keep the watchdog from detecting a whole set of hangs that can cause
userspace to wedge up.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131203/36c7dfe1/attachment.bin
On Tue, Dec 3, 2013 at 2:31 PM, [off-list ref] wrote:
On Tue, 03 Dec 2013 13:15:32 -0800, Vipul Jain said:
quoted
currently we configure/pet the watchdog from user space via /dev/ipmi0
device interface and I would like to do the pet part from kernel module.
That's actually defeating the purpose. If you do it from the kernel,
you keep the watchdog from detecting a whole set of hangs that can cause
userspace to wedge up.
From: Peter Teoh <hidden> Date: 2013-12-04 06:28:18
Hi Vipul,
I have seen this in a number of commercial software running on RHEL, and on
other realtime OS as well. The watchdog mechanism is always working in
pair: userspace "feeding" the dog (in the kernel). (btw, feed the dog
is a more usually used term than "pet" the dog. sorry for that. google
for that and perhaps you can get more info?).
Like Valdis said, this way you will know when userspace hang, which is the
key criteria for reboot. Why do u want to detect if the kernel hang
(versus busy doing something)? Theoretically that is not possible,
especially when all interrupt are disabled.
On Wed, Dec 4, 2013 at 6:45 AM, Vipul Jain [off-list ref] wrote:
On Tue, Dec 3, 2013 at 2:31 PM, [off-list ref] wrote:
quoted
On Tue, 03 Dec 2013 13:15:32 -0800, Vipul Jain said:
quoted
currently we configure/pet the watchdog from user space via /dev/ipmi0
device interface and I would like to do the pet part from kernel module.
That's actually defeating the purpose. If you do it from the kernel,
you keep the watchdog from detecting a whole set of hangs that can cause
userspace to wedge up.
Well we use different mechanism to detect user space hangs and take
corrective actions. Hence we want to separate the user space issues from
kernel space issues by using hardware watchdog pet in kernel space.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Tue, Dec 3, 2013 at 10:28 PM, Peter Teoh [off-list ref] wrote:
Hi Vipul,
I have seen this in a number of commercial software running on RHEL, and
on other realtime OS as well. The watchdog mechanism is always working in
pair: userspace "feeding" the dog (in the kernel). (btw, feed the dog
is a more usually used term than "pet" the dog. sorry for that. google
for that and perhaps you can get more info?).
Like Valdis said, this way you will know when userspace hang, which is the
key criteria for reboot. Why do u want to detect if the kernel hang
(versus busy doing something)? Theoretically that is not possible,
especially when all interrupt are disabled.
From: Peter Teoh <hidden> Date: 2013-12-05 01:42:30
On Thu, Dec 5, 2013 at 8:45 AM, Vipul Jain [off-list ref] wrote:
On Tue, Dec 3, 2013 at 10:28 PM, Peter Teoh [off-list ref]wrote:
quoted
Hi Vipul,
I have seen this in a number of commercial software running on RHEL, and
on other realtime OS as well. The watchdog mechanism is always working in
pair: userspace "feeding" the dog (in the kernel). (btw, feed the dog
is a more usually used term than "pet" the dog. sorry for that. google
for that and perhaps you can get more info?).
Like Valdis said, this way you will know when userspace hang, which is
the key criteria for reboot. Why do u want to detect if the kernel hang
(versus busy doing something)? Theoretically that is not possible,
especially when all interrupt are disabled.
quoted
Hi Peter,
If you don't mind can you please provide me more insight as what can be
false alarm I can encounter to move pet inside kernel module?
"Feeding the dog" is simply a periodic timer that wakes up and set a
variable. By the fact that the variable can be set/reset, also means that
the periodic timer IS working. In userspace, if you just have one process
to "feed the watchdog", then essentially we are monitoring whether
system-wide the performance overall is good enough so that the periodic
timer can be woken up at the required interval to reset the variable. If
some process hung, it MAY or MAY not affect the periodicity of this timer
process.
But if you have the timer embedded inside a particular high priority
process you want to monitor, and if it hung, and "feeding the watchdog"
will not execute, and the kernel will reboot you (read below - search
"reboot").
http://www.mjmwired.net/kernel/Documentation/watchdog/watchdog-api.txt
and more insights:
http://stackoverflow.com/questions/2020468/who-is-refreshing-hardware-watchdog-in-linux
(and lots of the "RELATED" questions at the side of the above page as well.)