[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110321161425.GC23614@elte.hu>
Date: Mon, 21 Mar 2011 17:14:25 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Jack Steiner <steiner@....com>
Cc: tglx@...utronix.de, hpa@...or.com, x86@...nel.org,
linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Cyrill Gorcunov <gorcunov@...il.com>
Subject: Re: [PATCH] x86, UV: Fix NMI handler for UV platforms
* Jack Steiner <steiner@....com> wrote:
> This fixes a problem seen on UV systems handling NMIs from the node controller.
> The original code used the DIE notifier as the hook to get to the UV NMI
> handler. This does not work if performance counters are active - the hw_perf
> code consumes the NMI and the UV handler is not called.
Sigh:
> --- linux.orig/arch/x86/kernel/traps.c 2011-03-21 09:05:43.000000000 -0500
> +++ linux/arch/x86/kernel/traps.c 2011-03-21 09:13:01.306555675 -0500
> @@ -57,6 +57,7 @@
> #include <asm/mce.h>
>
> #include <asm/mach_traps.h>
> +#include <asm/uv/uv.h>
>
> #ifdef CONFIG_X86_64
> #include <asm/x86_init.h>
> @@ -397,13 +398,16 @@ unknown_nmi_error(unsigned char reason,
> static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
> {
> unsigned char reason = 0;
> + int handled;
>
> /*
> * CPU-specific NMI must be processed before non-CPU-specific
> * NMI, otherwise we may lose it, because the CPU-specific
> * NMI can not be detected/processed on other CPUs.
> */
> - if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_STOP)
> + handled = uv_handle_nmi(regs, reason);
> + if (notify_die(DIE_NMI, "nmi", regs, 0, 2, SIGINT) == NOTIFY_STOP ||
> + handled)
> return;
Such code is extremely ugly. Please *reduce* the number of is_uv_system() type
of hacks in core x86 code, not increase it!
Any reason why a higher priority for the UV NMI handler cannot solve the 'perf
eats the NMI' problem?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists