public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 4/4] [x86] perf: fix accidentally ack'ing a second event on intel perf counter
@ 2010-09-01 13:04 Stephane Eranian
  2010-09-01 14:57 ` Robert Richter
  0 siblings, 1 reply; 15+ messages in thread
From: Stephane Eranian @ 2010-09-01 13:04 UTC (permalink / raw)
  To: Don Zickus; +Cc: linux-kernel, mingo, Peter Zijlstra, Robert Richter

Don,

Found your patch on LKML (I am not on it).

In your changelog you said:

> During testing of a patch to stop having the perf subsytem swallow nmis,
> it was uncovered that Nehalem boxes were randomly getting unknown nmis
> when using the perf tool.
>
> Moving the ack'ing of the PMI closer to when we get the status allows
> the hardware to properly re-set the PMU bit signaling another PMI was
> triggered during the processing of the first PMI.  This allows the new
> logic for dealing with the shortcomings of multiple PMIs to handle the
> extra NMI by 'eat'ing it later.

> Now one can wonder why are we getting a second PMI when we disable all
> the PMUs in the beginning of the NMI handler to prevent such a case, for
> that I do not know.  But I know the fix below helps deal with this quirk.
>

I am assuming you're talking about back-to-back NMIs here, not nested NMIs.
I don't quite understand the scenario here. Is it the case that you handled 1
overflow, and then right as you return from the interrupt, you get a second
PMI with a ovfl_status=0 ?

What events did you measure? Which counters did you use?
Did you have HT turned on?

> Tested on multiple Nehalems where the problem was occuring.  With the
> patch, the code now loops a second time to handle the second PMI (whereas
> before it was not).

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH 0/4] nmi perf fixes
@ 2010-09-01  2:56 Don Zickus
  2010-09-01  2:56 ` [PATCH 4/4] [x86] perf: fix accidentally ack'ing a second event on intel perf counter Don Zickus
  0 siblings, 1 reply; 15+ messages in thread
From: Don Zickus @ 2010-09-01  2:56 UTC (permalink / raw)
  To: mingo
  Cc: peterz, robert.richter, gorcunov, fweisbec, linux-kernel,
	ying.huang, ming.m.lin, yinghai, andi, Don Zickus

Fixes to allow unknown nmis to pass through the perf nmi handler instead
of being swallowed.  Contains patches that are already in Ingo's tree.  Added
here for completeness.  Based on ingo/tip

Tested on intel/amd

git pull git://fedorapeople.org/dzickus/

Don Zickus (2):
  [x86] perf: rename nmi variable to avoid clash with entry point
  [x86] perf: fix accidentally ack'ing a second event on intel perf
    counter

Peter Zijlstra (1):
  perf, x86: Fix handle_irq return values

Robert Richter (1):
  perf, x86: Try to handle unknown nmis with an enabled PMU

 arch/x86/kernel/cpu/perf_event.c       |   59 +++++++++++++++++++++++++-------
 arch/x86/kernel/cpu/perf_event_intel.c |   15 +++++---
 arch/x86/kernel/cpu/perf_event_p4.c    |    2 +-
 3 files changed, 56 insertions(+), 20 deletions(-)

-- 
1.7.2.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-09-03 14:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-01 13:04 [PATCH 4/4] [x86] perf: fix accidentally ack'ing a second event on intel perf counter Stephane Eranian
2010-09-01 14:57 ` Robert Richter
2010-09-02  8:13   ` Stephane Eranian
2010-09-02 13:11     ` Robert Richter
2010-09-02 14:19     ` Don Zickus
2010-09-02 14:39       ` Stephane Eranian
2010-09-02 15:47         ` Don Zickus
2010-09-02 16:18           ` Stephane Eranian
2010-09-03  8:33         ` Peter Zijlstra
2010-09-03 11:02           ` Stephane Eranian
2010-09-03 11:11             ` Peter Zijlstra
2010-09-03 11:52               ` Stephane Eranian
2010-09-03 14:03             ` Don Zickus
2010-09-03 14:28               ` Stephane Eranian
  -- strict thread matches above, loose matches on Subject: below --
2010-09-01  2:56 [PATCH 0/4] nmi perf fixes Don Zickus
2010-09-01  2:56 ` [PATCH 4/4] [x86] perf: fix accidentally ack'ing a second event on intel perf counter Don Zickus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox