[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174496591954.31282.937617439361491537.tip-bot2@tip-bot2>
Date: Fri, 18 Apr 2025 08:45:19 -0000
From: "tip-bot2 for Sandipan Das" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Sandipan Das <sandipan.das@....com>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: perf/core] perf/x86/amd/uncore: Add parameter to configure hrtimer
The following commit has been merged into the perf/core branch of tip:
Commit-ID: e1ed37b70fb355abf2e8032a2e972cdba53ae93c
Gitweb: https://git.kernel.org/tip/e1ed37b70fb355abf2e8032a2e972cdba53ae93c
Author: Sandipan Das <sandipan.das@....com>
AuthorDate: Fri, 18 Apr 2025 09:13:02 +05:30
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Fri, 18 Apr 2025 10:35:33 +02:00
perf/x86/amd/uncore: Add parameter to configure hrtimer
Introduce a module parameter for configuring the hrtimer duration in
milliseconds. The default duration is 60000 milliseconds and the intent
is to allow users to customize it to suit jitter tolerances. It should
be noted that a longer duration will reduce jitter but affect accuracy
if the programmed events cause the counters to overflow multiple times
in a single interval.
Signed-off-by: Sandipan Das <sandipan.das@....com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Link: https://lore.kernel.org/r/6cb0101da74955fa9c8361f168ffdf481ae8a200.1744906694.git.sandipan.das@amd.com
---
arch/x86/events/amd/uncore.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index e09bfbb..70e0af3 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -87,6 +87,10 @@ struct amd_uncore {
static struct amd_uncore uncores[UNCORE_TYPE_MAX];
+/* Interval for hrtimer, defaults to 60000 milliseconds */
+static unsigned int update_interval = 60 * MSEC_PER_SEC;
+module_param(update_interval, uint, 0444);
+
static struct amd_uncore_pmu *event_to_amd_uncore_pmu(struct perf_event *event)
{
return container_of(event->pmu, struct amd_uncore_pmu, pmu);
@@ -545,7 +549,7 @@ static int amd_uncore_ctx_init(struct amd_uncore *uncore, unsigned int cpu)
}
amd_uncore_init_hrtimer(curr);
- curr->hrtimer_duration = 60LL * NSEC_PER_SEC;
+ curr->hrtimer_duration = (u64)update_interval * NSEC_PER_MSEC;
cpumask_set_cpu(cpu, &pmu->active_mask);
}
Powered by blists - more mailing lists