lkml.org 
[lkml]   [2003]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Export touch_nmi_watchdog

On 5 Aug 2003, Andi Kleen wrote:
>
> > Otherwise this will just keep on expanding.
>
> It does expand on i386 exactly because the watchdog is disabled by default.

It's flaky enough that it _shouldn't_ be enabled by default.

Oh, it's easy for other architectures that don't support the same wide
range of hardware to look down on it, but the thing is, you don't have the
same variability in firmware, interrupt controllers, system buses and
CPU's.

And like it or not, but that "richness" is what makes the x86 so
successful.

But my point is that once you find a bug you should not just paper it over
and make sure that nobody finds it ever again. That's counter-productive.
It's especially counter-productive if you do it in a way where other
driver writers may well end up _copying_ the code that hides the bug. Just
because they don't know any better.

So my argument is that we'd actually be a whole lot better off just adding
something like

#ifdef CONFIG_WATCHDOG
#warning This driver does bad things and will not work
#endif

around the section that you found using the watchdog. Or something like
this in the init routine for the driver:

disable_watchdog();

which will disable the watchdog at run-time AND put a huge big bright
printk() on the screen saying "watchdog is not usable with this driver".
Again, to make people _aware_ of the problem when they hit it.

That way, next time somebody comes around and decides to nose around in
the driver, maybe they will fix it. Or when somebody else uses the driver
as a basis for their "new and improved" version, they'll take one look at
that, and say "oh, I won't make that mistake this time through".

In other words, we should make it clear that it is a CRIME to need to ping
the watchdog. Because if you disable enough interrupts to trigger the
watchdog, you _are_ doing bad things that are potentially visible to the
user.

So let the user know. Don't just silently say "let's kick the watchdog".

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.076 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site