public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] x86/perf/amd: AMD PMC counters and NMI latency
@ 2019-03-11 16:48 Lendacky, Thomas
  2019-03-11 16:48 ` [RFC PATCH 1/2] x86/perf/amd: Resolve race condition when disabling PMC Lendacky, Thomas
  2019-03-11 16:48 ` [RFC PATCH 2/2] x86/perf/amd: Resolve NMI latency issues when multiple PMCs are active Lendacky, Thomas
  0 siblings, 2 replies; 11+ messages in thread
From: Lendacky, Thomas @ 2019-03-11 16:48 UTC (permalink / raw)
  To: x86@kernel.org, linux-kernel@vger.kernel.org
  Cc: Peter Zijlstra, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Ingo Molnar, Borislav Petkov, Namhyung Kim, Thomas Gleixner,
	Jiri Olsa

This patch series addresses issues with increased NMI latency in newer
AMD processors that can result in unknown NMI messages when PMC counters
are active.

The following fixes are included in this series:

- Resolve a race condition when disabling an overflowed PMC counter,
  specifically when updating the PMC counter with a new value.
- Resolve handling of multiple active PMC counter overflows in the perf
  NMI handler and when to report that the NMI is not related to a PMC.

I'm looking for feedback on the direction used in these two patches. In
the first patch, the reset check loop typically only runs one iteration,
and very rarely ever ran 3 or 4 times. I also looked at an alternative to
the first patch where I set a per-CPU, per-PMC flag that can be checked
in the NMI handler when it is found that the PMC hasn't overflowed. That
would mean the sample would be lost, though (on average I was seeing about
a 0.20% sample loss that way).

---

This patch series is based off of the perf/core branch of tip:
  https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core

  Commit c978b9460fe1 ("Merge tag 'perf-core-for-mingo-5.1-20190225' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core")

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

end of thread, other threads:[~2019-03-18  9:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-11 16:48 [RFC PATCH 0/2] x86/perf/amd: AMD PMC counters and NMI latency Lendacky, Thomas
2019-03-11 16:48 ` [RFC PATCH 1/2] x86/perf/amd: Resolve race condition when disabling PMC Lendacky, Thomas
2019-03-15 10:50   ` Peter Zijlstra
2019-03-15 14:06     ` Lendacky, Thomas
2019-03-11 16:48 ` [RFC PATCH 2/2] x86/perf/amd: Resolve NMI latency issues when multiple PMCs are active Lendacky, Thomas
2019-03-15 12:03   ` Peter Zijlstra
2019-03-15 14:44     ` Lendacky, Thomas
2019-03-15 15:11       ` Peter Zijlstra
2019-03-15 15:50         ` Lendacky, Thomas
2019-03-15 17:47           ` Lendacky, Thomas
2019-03-18  9:47     ` Peter Zijlstra

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