From: Sandipan Das <sandipan.das@amd.com>
To: <linux-perf-users@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<namhyung@kernel.org>, <mark.rutland@arm.com>,
<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
<irogers@google.com>, <adrian.hunter@intel.com>,
<kan.liang@linux.intel.com>, <tglx@linutronix.de>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
<eranian@google.com>, <songliubraving@meta.com>,
<ravi.bangoria@amd.com>, <ananth.narayan@amd.com>,
<sandipan.das@amd.com>
Subject: [PATCH 0/4] perf/x86/amd/uncore: Overflow handling enhancements
Date: Wed, 9 Apr 2025 13:27:05 +0530 [thread overview]
Message-ID: <cover.1744184837.git.sandipan.das@amd.com> (raw)
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
next reply other threads:[~2025-04-09 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 7:57 Sandipan Das [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1744184837.git.sandipan.das@amd.com \
--to=sandipan.das@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth.narayan@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=songliubraving@meta.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox