diff options
author | Sandipan Das <sandipan.das@amd.com> | 2025-04-18 09:13:03 +0530 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-04-18 10:35:34 +0200 |
commit | 2492e5aba2be064d0604ae23ae0770ecc0168192 (patch) | |
tree | 8f27de3ebe5236c79f8f0012674f6b324903aed7 /scripts/lib/kdoc/kdoc_files.py | |
parent | e1ed37b70fb355abf2e8032a2e972cdba53ae93c (diff) |
perf/x86/amd/uncore: Prevent UMC counters from saturating
Unlike L3 and DF counters, UMC counters (PERF_CTRs) set the Overflow bit
(bit 48) and saturate on overflow. A subsequent pmu->read() of the event
reports an incorrect accumulated count as there is no difference between
the previous and the current values of the counter.
To avoid this, inspect the current counter value and proactively reset
the corresponding PERF_CTR register on every pmu->read(). Combined with
the periodic reads initiated by the hrtimer, the counters never get a
chance saturate but the resolution reduces to 47 bits.
Fixes: 25e56847821f ("perf/x86/amd/uncore: Add memory controller support")
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Song Liu <song@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/dee9c8af2c6d66814cf4c6224529c144c620cf2c.1744906694.git.sandipan.das@amd.com
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions