Messages in this thread Patch in this message | | | Date | Tue, 01 Feb 2011 20:52:19 +0300 | From | Cyrill Gorcunov <> | Subject | Re: 2.6.38-rc2: Uhhuh. NMI received for unknown reason 2d on CPU 0. |
| |
On 02/01/2011 07:27 PM, George Spelvin wrote: > Since upgrading to -rc2 (-rc3 is compiling right now), I've been getting > complaints at irregular intervals. This didn't used to happen with 2.6.37. > ... > Should I bisect this, or does someone know what might be happening? > > Thank you! >
I fear it's known issue at moment, we're trying to resolve it. There is an option -- to disable nmi_watchdog (nmi_watchdog=0 boot option).
But if you have a will or would like to help debug the problem -- mind to try the patch below? Note the patch is ugly at moment and must *not* be running on non-P4 system (and I only compile-tested it so no guarantees at all, and I've CC'ed a couple of people as well)
Cyrill
--- arch/x86/kernel/cpu/perf_event.c | 12 +++++++++++- arch/x86/kernel/cpu/perf_event_p4.c | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
Index: linux-2.6.git/arch/x86/kernel/cpu/perf_event.c ===================================================================== --- linux-2.6.git.orig/arch/x86/kernel/cpu/perf_event.c +++ linux-2.6.git/arch/x86/kernel/cpu/perf_event.c @@ -1075,7 +1075,17 @@ static void x86_pmu_start(struct perf_ev
cpuc->events[idx] = event; __set_bit(idx, cpuc->active_mask); - __set_bit(idx, cpuc->running); + if (1) { + /* running mask is shared across a core */ + int leader_cpu; + struct cpu_hw_events *leader_cpuc; + + leader_cpu = cpumask_first(__get_cpu_var(cpu_sibling_map)); + leader_cpuc = &per_cpu(cpu_hw_events, leader_cpu); + + __set_bit(idx, leader_cpuc->running); + } else + __set_bit(idx, cpuc->running); x86_pmu.enable(event); perf_event_update_userpage(event); } Index: linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c ===================================================================== --- linux-2.6.git.orig/arch/x86/kernel/cpu/perf_event_p4.c +++ linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c @@ -907,8 +907,14 @@ static int p4_pmu_handle_irq(struct pt_r int overflow;
if (!test_bit(idx, cpuc->active_mask)) { + int leader_cpu; + struct cpu_hw_events *leader_cpuc; + + leader_cpu = cpumask_first(__get_cpu_var(cpu_sibling_map)); + leader_cpuc = &per_cpu(cpu_hw_events, leader_cpu); + /* catch in-flight IRQs */ - if (__test_and_clear_bit(idx, cpuc->running)) + if (__test_and_clear_bit(idx, leader_cpuc->running)) handled++; continue; }
| |