* [PATCH perf/core/urgent] perf, x86: Handle in flight IRQs on P4 platform
@ 2010-09-30 3:01 Don Zickus
2010-10-04 20:25 ` [tip:perf/urgent] perf, x86: Handle in flight NMIs " tip-bot for Cyrill Gorcunov
0 siblings, 1 reply; 2+ messages in thread
From: Don Zickus @ 2010-09-30 3:01 UTC (permalink / raw)
To: mingo
Cc: linux-kernel, fweisbec, peterz, Cyrill Gorcunov, Cyrill Gorcunov,
Robert Richter, Lin Ming, Don Zickus
From: Cyrill Gorcunov <gorcunov@gmail.com>
Stephane reported we've forgot to guard the P4 platform
against spurious in-flight performance IRQs. Fix it.
[ the patch is a complement to commit 63e6be6d98e1 ]
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
CC: Robert Richter <robert.richter@amd.com>
CC: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
arch/x86/kernel/cpu/perf_event_p4.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index b560db3..2490151 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
int overflow;
- if (!test_bit(idx, cpuc->active_mask))
+ if (!test_bit(idx, cpuc->active_mask)) {
+ /* catch in-flight IRQs */
+ if (__test_and_clear_bit(idx, cpuc->running))
+ handled++;
continue;
+ }
event = cpuc->events[idx];
hwc = &event->hw;
--
1.7.2.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:perf/urgent] perf, x86: Handle in flight NMIs on P4 platform
2010-09-30 3:01 [PATCH perf/core/urgent] perf, x86: Handle in flight IRQs on P4 platform Don Zickus
@ 2010-10-04 20:25 ` tip-bot for Cyrill Gorcunov
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Cyrill Gorcunov @ 2010-10-04 20:25 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, eranian, hpa, mingo, gorcunov, gorcunov,
robert.richter, ming.m.lin, tglx, mingo, dzickus
Commit-ID: 03e22198d2379ffa746c9ea332fbb1f094f9423b
Gitweb: http://git.kernel.org/tip/03e22198d2379ffa746c9ea332fbb1f094f9423b
Author: Cyrill Gorcunov <gorcunov@gmail.com>
AuthorDate: Wed, 29 Sep 2010 23:01:38 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 30 Sep 2010 09:17:59 +0200
perf, x86: Handle in flight NMIs on P4 platform
Stephane reported we've forgot to guard the P4 platform
against spurious in-flight performance IRQs. Fix it.
This fixes potential spurious 'dazed and confused' NMI
messages.
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Robert Richter <robert.richter@amd.com>
Cc: Lin Ming <ming.m.lin@intel.com>
LKML-Reference: <1285815698-4298-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/cpu/perf_event_p4.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c
index b560db3..2490151 100644
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -660,8 +660,12 @@ static int p4_pmu_handle_irq(struct pt_regs *regs)
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
int overflow;
- if (!test_bit(idx, cpuc->active_mask))
+ if (!test_bit(idx, cpuc->active_mask)) {
+ /* catch in-flight IRQs */
+ if (__test_and_clear_bit(idx, cpuc->running))
+ handled++;
continue;
+ }
event = cpuc->events[idx];
hwc = &event->hw;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-04 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-30 3:01 [PATCH perf/core/urgent] perf, x86: Handle in flight IRQs on P4 platform Don Zickus
2010-10-04 20:25 ` [tip:perf/urgent] perf, x86: Handle in flight NMIs " tip-bot for Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome