[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250405141635.243786-2-wangqing7171@gmail.com>
Date: Sat, 5 Apr 2025 22:16:34 +0800
From: Qing Wong <wangqing7171@...il.com>
To: peterz@...radead.org,
mingo@...hat.com,
acme@...nel.org,
namhyung@...nel.org,
mark.rutland@....com,
alexander.shishkin@...ux.intel.com,
jolsa@...nel.org,
irogers@...gle.com,
adrian.hunter@...el.com,
kan.liang@...ux.intel.com,
linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Qing Wang <wangqing7171@...il.com>
Subject: [PATCH 1/2] Revert "perf/core: Fix hardlockup failure caused by perf throttle"
From: Qing Wang <wangqing7171@...il.com>
This reverts commit 15def34e2635ab7e0e96f1bc32e1b69609f14942.
The hardlockup failure does not exist because:
1. The hardlockup's watchdog event is a pinned event, which exclusively
occupies a dedicated PMC (Performance Monitoring Counter) and is unaffected
by PMC scheduling.
2. The hardware event throttling mechanism only disables the specific PMC
where throttling occurs, without impacting other PMCs. Consequently, The
hardlockup event's dedicated PMC remains entirely unaffected.
Signed-off-by: Qing Wang <wangqing7171@...il.com>
---
kernel/events/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 0bb21659e252..29cdb240e104 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10049,8 +10049,8 @@ __perf_event_account_interrupt(struct perf_event *event, int throttle)
hwc->interrupts = 1;
} else {
hwc->interrupts++;
- if (unlikely(throttle &&
- hwc->interrupts > max_samples_per_tick)) {
+ if (unlikely(throttle
+ && hwc->interrupts >= max_samples_per_tick)) {
__this_cpu_inc(perf_throttled_count);
tick_dep_set_cpu(smp_processor_id(), TICK_DEP_BIT_PERF_EVENTS);
hwc->interrupts = MAX_INTERRUPTS;
--
2.43.0
Powered by blists - more mailing lists