From: Kirill Korotaev <dev@sw.ru>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] NMI watchdog config option (was: Re: [PATCH] NMI lockup and AltSysRq-P dumping calltraces on _all_ cpus via NMI IPI)
Date: Tue, 17 May 2005 11:04:55 +0400 [thread overview]
Message-ID: <42899797.2090702@sw.ru> (raw)
In-Reply-To: <768860000.1116282855@flay>
[-- Attachment #1: Type: text/plain, Size: 1550 bytes --]
>>against 2.6.12-rc4
>>
>>This patch adds dumping of calltraces on _all_ CPUs
>>on AltSysRq-P and NMI LOCKUP. It does this via sending
>>NMI IPI interrupts to the cpus.
>>
>>I saw the same patch in RedHat kernels, here goes our own version of the patch, not sure it will be accepted, but I think it can be used by some people at least for debugging lockups etc.
>
>
> I'd done a similar thing, but just using smp_call_function (I hacked the
> interrupt routine to fish pt_regs back out, and override *info in some
> cases). Doing NMIs, as you've done, is probably nicer, but a lot more
> work.
Yes, but it catches _all_ calltraces which is very important, espicially
when you do not have NMI watchdog enabled.
BTW, why NMI watchdog is disabled by default? We constantly making it on
by default in our kernels and had no problems with it.
I send a patch attached which tunes NMI watchdog by config option...
> The problem with it (and my patch too) is that you're hooking into arch
> specific code from generic code, which means you'll break every other
> arch apart from i386. Fixing this is a pain in the rear end, but would
> be needed to merge the patch. OTOH, the patch is extremely useful, so
> would be nice to fix if you have the energy ...
Well, I used #idef __i386__ to not break generic code for other archs.
I have no any other hardware except for i386+, so it is almost
impossible for me to make this code work on other archs. I think people
who are interested in this functionality will provide the required code
later.
Kirill
[-- Attachment #2: diff-nmiwd-default-20050517 --]
[-- Type: text/plain, Size: 1151 bytes --]
--- ./arch/i386/Kconfig.debug.nmiwd 2005-05-10 16:09:57.000000000 +0400
+++ ./arch/i386/Kconfig.debug 2005-05-17 10:49:03.000000000 +0400
@@ -59,6 +59,14 @@ config 4KSTACKS
on the VM subsystem for higher order allocations. This option
will also use IRQ stacks to compensate for the reduced stackspace.
+config NMI_WATCHDOG
+ bool "NMI Watchdog"
+ default y
+ help
+ If you say Y here the kernel will activate NMI watchdog by default
+ on boot. You can still activate NMI watchdog via nmi_watchdog
+ command line option even if you say N here.
+
config X86_FIND_SMP_CONFIG
bool
depends on X86_LOCAL_APIC || X86_VOYAGER
--- ./arch/i386/kernel/nmi.c.nmiwd 2005-05-10 18:20:00.000000000 +0400
+++ ./arch/i386/kernel/nmi.c 2005-05-17 10:47:38.000000000 +0400
@@ -34,7 +34,12 @@
#include "mach_traps.h"
-unsigned int nmi_watchdog = NMI_NONE;
+#ifdef CONFIG_NMI_WATCHDOG
+#define NMI_DEFAULT NMI_IO_APIC
+#else
+#define NMI_DEFAULT NMI_NONE
+#endif
+unsigned int nmi_watchdog = NMI_DEFAULT;
extern int unknown_nmi_panic;
static unsigned int nmi_hz = HZ;
static unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */
next prev parent reply other threads:[~2005-05-17 7:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-11 15:57 [PATCH] NMI lockup and AltSysRq-P dumping calltraces on _all_ cpus via NMI IPI Kirill Korotaev
2005-05-16 22:34 ` Martin J. Bligh
2005-05-17 7:04 ` Kirill Korotaev [this message]
2005-05-17 7:15 ` [PATCH] NMI watchdog config option (was: Re: [PATCH] NMI lockup and AltSysRq-P dumping calltraces on _all_ cpus via NMI IPI) Andrew Morton
2005-05-17 10:41 ` Kirill Korotaev
2005-05-17 14:01 ` Martin J. Bligh
2005-05-17 22:16 ` Andrew Morton
2005-05-17 22:26 ` Martin J. Bligh
2005-05-17 17:30 ` Valdis.Kletnieks
2005-05-17 15:48 ` Linus Torvalds
2005-05-17 15:59 ` Maciej W. Rozycki
2005-05-17 16:32 ` Linus Torvalds
2005-05-17 17:04 ` Maciej W. Rozycki
2005-05-17 17:20 ` Linus Torvalds
2005-05-17 17:44 ` Maciej W. Rozycki
2005-05-17 17:25 ` Valdis.Kletnieks
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=42899797.2090702@sw.ru \
--to=dev@sw.ru \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox