public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] perf/x86/amd/uncore: Overflow handling enhancements
@ 2025-04-09  7:57 Sandipan Das
  2025-04-09  7:57 ` [PATCH 1/4] perf/x86/amd/uncore: Remove unused member from amd_uncore_ctx Sandipan Das
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sandipan Das @ 2025-04-09  7:57 UTC (permalink / raw)
  To: linux-perf-users, linux-kernel
  Cc: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
	jolsa, irogers, adrian.hunter, kan.liang, tglx, bp, dave.hansen,
	x86, hpa, eranian, songliubraving, ravi.bangoria, ananth.narayan,
	sandipan.das

Uncore counters on AMD processors either roll over or saturate on
overflow and the amd-uncore driver has no way of knowing if multiple
overflows have occurred between two successive pmu->read() requests for
an event. This makes the user-visible counter values inaccurate. Solve
this by periodically initiating pmu->read() in order to keep prev_count
up-to-date. The approach follows Intel's precedent in handling uncore
counters.

Sandipan Das (4):
  perf/x86/amd/uncore: Remove unused member from amd_uncore_ctx
  perf/x86/amd/uncore: Use hrtimer for handling overflows
  perf/x86/amd/uncore: Add parameter to configure hrtimer
  perf/x86/amd/uncore: Prevent UMC counters from saturating

 arch/x86/events/amd/uncore.c | 109 ++++++++++++++++++++++++++++++++++-
 1 file changed, 107 insertions(+), 2 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-04-16 19:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  7:57 [PATCH 0/4] perf/x86/amd/uncore: Overflow handling enhancements Sandipan Das
2025-04-09  7:57 ` [PATCH 1/4] perf/x86/amd/uncore: Remove unused member from amd_uncore_ctx Sandipan Das
2025-04-09  7:57 ` [PATCH 2/4] perf/x86/amd/uncore: Use hrtimer for handling overflows Sandipan Das
2025-04-10  8:20   ` Peter Zijlstra
2025-04-10  8:40     ` Sandipan Das
2025-04-09  7:57 ` [PATCH 3/4] perf/x86/amd/uncore: Add parameter to configure hrtimer Sandipan Das
2025-04-09  7:57 ` [PATCH 4/4] perf/x86/amd/uncore: Prevent UMC counters from saturating Sandipan Das
2025-04-16 19:15   ` Song Liu

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