All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@colin2.muc.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Arjan van de Ven <arjanv@redhat.com>,
	Andrew Morton <akpm@osdl.org>, Andi Kleen <ak@muc.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Export touch_nmi_watchdog
Date: 6 Aug 2003 02:07:16 +0200
Date: Wed, 6 Aug 2003 02:07:16 +0200	[thread overview]
Message-ID: <20030806000716.GA68984@colin2.muc.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0308051503220.2835-100000@home.osdl.org>

On Tue, Aug 05, 2003 at 03:14:00PM -0700, Linus Torvalds wrote:
> 	#ifdef CONFIG_WATCHDOG
> 	#warning This driver does bad things and will not work
> 	#endif

Well the problem is that many of my multiple CPU testboxes have a fusion
controller (it's the standard on board chip on the AMD Quartet and Newisys
systems). 

At least for my testing it would be quite inconvenient to not
have the watchdog. I also don't see anybody comming around and fixing
the SCSI error handler of that driver (scsi error handlers seem
to be always very bad code, undoubtedly because it's a ugly problem)

(fortunately errors happen only infrequently, usually when I break
something else...) 

But still I would prefer the NMI watchdog not triggering then.

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

How about this approach: 

Define a new function driver_touch_watchdog() for export and it printks
something the first time it is used.

--- linux-2.6.0test2-amd64/arch/i386/kernel/nmi.c-o	2003-07-11 03:09:18.000000000 +0200
+++ linux-2.6.0test2-amd64/arch/i386/kernel/nmi.c	2003-08-06 02:03:41.000000000 +0200
@@ -25,6 +25,7 @@
 #include <linux/module.h>
 #include <linux/nmi.h>
 #include <linux/sysdev.h>
+#include <linux/kallsyms.h>
 
 #include <asm/smp.h>
 #include <asm/mtrr.h>
@@ -455,3 +456,18 @@
 EXPORT_SYMBOL(enable_lapic_nmi_watchdog);
 EXPORT_SYMBOL(disable_timer_nmi_watchdog);
 EXPORT_SYMBOL(enable_timer_nmi_watchdog);
+
+/* Deprecated function to silence the NMI watchdog for long waits.
+   Better fix the driver instead of using this. */
+void driver_touch_watchdog(void)
+{ 
+	static int used; 
+	if (!used) { 
+		print_symbol(KERN_ERR "Function %s uses driver_touch_watchdog.\n",
+			     __builtin_return_address(0));
+	} 
+	used = 1;
+	touch_nmi_watchdog();
+}  
+
+EXPORT_SYMBOL(driver_touch_watchdog);

-Andi


  reply	other threads:[~2003-08-06  0:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-05 19:29 [PATCH] Export touch_nmi_watchdog Andi Kleen
2003-08-05 19:38 ` Andrew Morton
2003-08-05 20:08   ` Andi Kleen
2003-08-05 20:20     ` Arjan van de Ven
2003-08-05 20:25       ` Linus Torvalds
2003-08-05 20:31         ` Arjan van de Ven
2003-08-05 21:07           ` Linus Torvalds
2003-08-05 21:05             ` Tim Hockin
2003-08-05 21:14             ` Andi Kleen
2003-08-05 21:15               ` Arjan van de Ven
2003-08-05 21:19                 ` Andi Kleen
2003-08-05 22:14               ` Linus Torvalds
2003-08-06  0:07                 ` Andi Kleen [this message]
2003-08-06 11:06                   ` Ingo Oeser
2003-08-06 15:31                     ` Linus Torvalds
2003-08-05 20:45         ` Andi Kleen
2003-08-05 21:11       ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030806000716.GA68984@colin2.muc.de \
    --to=ak@colin2.muc.de \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.