diff options
author | Sandipan Das <sandipan.das@amd.com> | 2025-04-18 09:13:01 +0530 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-04-18 10:35:33 +0200 |
commit | 6d937e044bc9bfd52dc50f7fc06d22018841472e (patch) | |
tree | 4b0bb253f54f8e0121fcf82b161147f6be7fa3c2 /scripts/lib/kdoc/kdoc_files.py | |
parent | 05c9b0cbe4b822c42382d27e3f73918600594882 (diff) |
perf/x86/amd/uncore: Use hrtimer for handling overflows
Uncore counters do not provide mechanisms like interrupts to report
overflows and the accumulated user-visible count is incorrect if there
is more than one overflow between two successive read requests for the
same event because the value of prev_count goes out-of-date for
calculating the correct delta.
To avoid this, start a hrtimer to periodically initiate a pmu->read() of
the active counters for keeping prev_count up-to-date. It should be
noted that the hrtimer duration should be lesser than the shortest time
it takes for a counter to overflow for this approach to be effective.
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/8ecf5fe20452da1cd19cf3ff4954d3e7c5137468.1744906694.git.sandipan.das@amd.com
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions