public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: George Spelvin <linux@horizon.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Don Zickus <dzickus@redhat.com>, Lin Ming <ming.m.lin@intel.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: 2.6.38-rc2: Uhhuh. NMI received for unknown reason 2d on CPU 0.
Date: Tue, 01 Feb 2011 20:52:19 +0300	[thread overview]
Message-ID: <4D484853.9020409@gmail.com> (raw)
In-Reply-To: <20110201162703.2284.qmail@science.horizon.com>

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;
 		}


  reply	other threads:[~2011-02-01 17:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 16:27 2.6.38-rc2: Uhhuh. NMI received for unknown reason 2d on CPU 0 George Spelvin
2011-02-01 17:52 ` Cyrill Gorcunov [this message]
2011-02-01 18:41   ` Don Zickus
2011-02-01 18:44     ` Cyrill Gorcunov
2011-02-01 18:51       ` Don Zickus
2011-02-01 20:00         ` Cyrill Gorcunov
2011-02-02  2:36   ` George Spelvin
2011-02-02  4:18     ` Cyrill Gorcunov
2011-02-16  1:57       ` Dave Airlie
2011-02-16  4:19         ` Cyrill Gorcunov
2011-02-16  8:37           ` Ingo Molnar
2011-02-16  8:49             ` Cyrill Gorcunov
2011-02-16  8:56               ` Ingo Molnar
2011-02-16  9:33                 ` Cyrill Gorcunov
2011-02-16 10:09                   ` Ingo Molnar
2011-02-16 11:08                     ` Cyrill Gorcunov
2011-02-16 11:33                       ` [tip:perf/urgent] perf, x86: P4 PMU: Fix spurious NMI messages tip-bot for Cyrill Gorcunov
2011-02-16 11:57         ` 2.6.38-rc2: Uhhuh. NMI received for unknown reason 2d on CPU 0 George Spelvin
2011-02-17  2:56           ` Dave Airlie
2011-02-17  7:48             ` Cyrill Gorcunov
  -- strict thread matches above, loose matches on Subject: below --
2011-02-14 13:36 Preeti Khurana
2011-02-17  0:17 ` Ryan Underwood
2011-02-17  7:59   ` Cyrill Gorcunov
2011-02-18  2:40     ` Paul E. McKenney
2011-02-18 20:38       ` Underwood, Ryan
2011-02-21  6:56         ` Preeti Khurana
2011-02-21 16:45           ` Underwood, Ryan

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=4D484853.9020409@gmail.com \
    --to=gorcunov@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dzickus@redhat.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    /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