CELF Project Proposal/Create a watchdog framework for the Linux kernel


 * Summary : Create a watchdog framework for the Linux kernel


 * Proposer : Wolfram Sang

Description
The watchdog API of the Linux kernel is documented and used for years. Yet, there is no abstraction for its common functionality (open, write, ioctl, close), so every watchdog driver has to implement those methods on its own. In addition to the vast amount of code duplication in the kernel source, this is also error-prone as there are subtle corner-cases in handling the watchdog and the userspace-input correctly. Although there is code review for new drivers, it seems very desirable to improve the situation as a whole.

There have been two approaches for a generic watchdog framework, one from Alan Cox and one from Wim van Sebroeck, the current watchdog maintainer. Sadly, nothing from those have made it to mainline so far. This is a bit surprising; although watchdogs are usually rather simple devices, they are crucial for the stability concept of an enormous number of devices. The benefit of this proposal is to have a rock-solid, well maintainable and trustworthy watchdog framework, which makes writing new drivers faster and less error-prone.

Related work

 * Proposal by Alan Cox:
 * http://git.kernel.org/?p=linux/kernel/git/wim/linux-2.6-watchdog-next.git;a=shortlog;h=refs/heads/alan-generic-watchdog
 * Proposal by Wim van Sebroeck:
 * http://git.kernel.org/?p=linux/kernel/git/wim/linux-2.6-watchdog-next.git;a=shortlog;h=refs/heads/wim-generic-watchdog

Scope
My estimation would be 4 weeks of development and testing