From: Ingo Molnar <mingo@elte.hu>
To: Don Zickus <dzickus@redhat.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>,
Lin Ming <ming.m.lin@intel.com>,
Shaun Ruffell <sruffell@digium.com>,
Maciej Rutecki <maciej.rutecki@gmail.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Stephane Eranian <eranian@google.com>,
Robert Richter <robert.richter@amd.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] perf, x86: fix unknown NMIs on a Pentium4 box
Date: Thu, 14 Apr 2011 20:45:40 +0200 [thread overview]
Message-ID: <20110414184540.GC16064@elte.hu> (raw)
In-Reply-To: <20110414183231.GN16939@redhat.com>
* Don Zickus <dzickus@redhat.com> wrote:
> On Thu, Apr 14, 2011 at 07:43:27PM +0200, Ingo Molnar wrote:
> >
> > * Cyrill Gorcunov <gorcunov@openvz.org> wrote:
> >
> > > --- linux-2.6.git.orig/arch/x86/kernel/cpu/perf_event.c
> > > +++ linux-2.6.git/arch/x86/kernel/cpu/perf_event.c
> > > @@ -1370,9 +1370,16 @@ perf_event_nmi_handler(struct notifier_b
> > > return NOTIFY_DONE;
> > > }
> > >
> > > - apic_write(APIC_LVTPC, APIC_DM_NMI);
> > >
> > > handled = x86_pmu.handle_irq(args->regs);
> > > +
> > > + /*
> > > + * Note the unmasking of LVTPC entry must be
> > > + * done *after* counter oveflow flag is cleared
> > > + * otherwise it might lead to double NMIs generation.
> > > + */
> > > + apic_write(APIC_LVTPC, APIC_DM_NMI);
> > > +
> > > if (!handled)
> > > return NOTIFY_DONE;
> > >
> >
> > This breaks 'perf top' on Intel Nehalem and probably other CPUs. The NMI gets
> > stuck fast on all CPUs:
> >
> > NMI: 16 6 3 3 3 3 3 3 3 3 3 3 3 3 4 5 Non-maskable interrupts
>
> Damn it, I was working on getting there. First I did P4s, now I was working
> on acme's core2 issues. Nehalem was next on my list, I swear! :-)))))
>
> So this sucks. I'll grab a Nehalem and see what went wrong. It's probably
> because of the other 'this seems to work' hacks I put in that handler. I bet
> if I clean those up, this problem will be fixed.
>
> I will note that using my patch on a core2quad system, lowered the number of
> back-to-back NMIs I was seeing when running a couple of perf records and a
> make -j8 (still generates unknown NMIs though :-( ).
Here's the cpuinfo:
processor : 15
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU X55600 @ 2.80GHz
stepping : 5
cpu MHz : 2794.000
cache size : 8192 KB
physical id : 1
siblings : 8
core id : 3
cpu cores : 4
apicid : 23
initial apicid : 23
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
bogomips : 5599.19
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
just in case you have trouble reproducing the problem.
Thanks,
Ingo
next prev parent reply other threads:[~2011-04-14 18:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 14:48 [PATCH -tip] perf, x86: fix unknown NMIs on a Pentium4 box Cyrill Gorcunov
2011-04-14 15:03 ` Ingo Molnar
2011-04-14 15:06 ` Cyrill Gorcunov
2011-04-14 17:43 ` Ingo Molnar
2011-04-14 17:44 ` Ingo Molnar
2011-04-14 17:49 ` Cyrill Gorcunov
2011-04-14 18:12 ` Shaun Ruffell
2011-04-14 18:14 ` Cyrill Gorcunov
2011-04-14 18:19 ` Cyrill Gorcunov
2011-04-14 19:35 ` David Ahern
2011-04-14 17:46 ` Cyrill Gorcunov
2011-04-14 18:32 ` Don Zickus
2011-04-14 18:45 ` Ingo Molnar [this message]
2011-04-14 18:46 ` Ingo Molnar
2011-04-14 19:43 ` Cyrill Gorcunov
2011-04-14 19:57 ` Don Zickus
2011-04-14 20:05 ` Cyrill Gorcunov
2011-04-14 20:18 ` Cyrill Gorcunov
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=20110414184540.GC16064@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=gorcunov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.rutecki@gmail.com \
--cc=ming.m.lin@intel.com \
--cc=robert.richter@amd.com \
--cc=sruffell@digium.com \
/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