[PATCH 0/4] thermal/drivers/samsung: acpm-tmu: fix IRQ storm and tune GS101 DT
From: André Draszik
Date: Tue Dec 01 2026 - 08:20:02 EST
Hi,
The acpm-tmu driver wakes the thermal core in a storm of interrupts
whenever a GS101 CPU thermal zone is inside its trip window or at its
hot trip: on Pixel 6 that is up to 330 interrupts per second while
power_allocator throttles the two Cortex-X1 cores. This series stops
the storm and adjusts the thermal zones in gs101-tmu.dtsi.
- Raise the critical trips from 105 °C to 115 °C; today a loaded phone
comes within 3 K of an emergency shutdown.
- Poll the CPU zones every 10 ms while throttling, give them
sustainable-power, and align switch-on and little-mitigate with the
vendor DT.
- Add the ACPM TMU set_hysteresis op, which the driver fix needs.
- Stop the interrupt storm, and report the trend of a zone relative to
its trip so that step_wise does not depend on the storm.
Pixel 6, non-debug kernel. Columns are TMU interrupts, peak temperature
of the big cluster zone and the throughput of a busy loop on the two
Cortex-X1 cores in million iterations per second. "base" is
next-20261123 with the prerequisite below applied, as ranges over
several boots ("patches 1-2" and "patches 3-4" are from a single boot
each).
Both Cortex-X1 cores loaded for 8 s:
step_wise power_allocator
base 49-694 99-100 °C 1.02-1.23 0-2650 58-85 °C 0.23-0.72
patches 1-2 187-223 99-100 °C 1.14-1.22 125-142 88 °C 1.05
patches 3-4 3-5 96-99 °C 1.07-1.18 28 81-83 °C 0.49-0.52
patches 1,3-4 2-6 96-99 °C 1.01-1.12 29-30 81-89 °C 0.48-0.52
patches 1-4 3-4 93-95 °C 1.08-1.18 4-6 89-91 °C 1.03-1.14
(In one base power_allocator run the big cluster stayed at 500 MHz and
58 °C for all 8 s, below the 80 °C switch-on trip, with 0 interrupts.)
All eight cores loaded for 60 s, step_wise:
base 101-102 °C within 22 s; the test stops the load there
patches 1-2 598-793 99 °C 0.84-0.89
patches 3-4 8 98 °C 0.81 (run 0); 101-102 °C in 0.9 s*
patches 1,3-4 11-75 100-101 °C 0.68-0.74
patches 1-4 5 91-93 °C 0.70-0.79
* Two warm back-to-back runs stopped at the 101 °C safety limit (32
and 30 interrupts), 3 K below the unpatched 105 °C critical trip.
All eight cores loaded for 60 s, power_allocator:
base 165** 75 °C 0.46
patches 1-2 44 92 °C 0.75
patches 3-4 272 82 °C 0.44
patches 1,3-4 368 84 °C 0.42
patches 1-4 4-5 91-92 °C 0.69-0.77
** Single base run: the big cluster stayed at 984 MHz (<=75 °C, below
the 80 °C switch-on trip) for 59.98 s and the mid cluster only hit
80 °C for ~6 s before staying at 799 MHz (67-71 °C). On patches 3-4
and 1,3-4, the 272 and 368 interrupts are repeated 80 °C crossings
without sustainable-power (~4.5-6/s), not a comparator storm.
The vendor kernel polls these zones every 50 ms; 50 ms suffices for
step_wise, but power_allocator oscillates at 50 ms and 20 ms with its
default gains (see patch 2 for numbers).
Merging (suggested split across maintainer trees):
The series is ordered by tree so that patches 1-2 (DT) and patches 3-4
(firmware + thermal) can be merged independently in parallel now,
rather than holding patch 2 for a later cycle:
- Patches 1-2 via the Samsung SoC DT tree: no build dependency on
patches 3-4. gs101-tmu.dtsi is in linux-next only so far (not in
v7.4-rc1), so both halves target the same merge window. Even without
patches 3-4, patches 1-2 match or improve on base across all three
tables above. In separate measurements outside the tables, boot saw
35 TMU interrupts (at 120 s uptime) vs 91 (110 s) and 113 (62 s) on
base; the only observed trade-off while waiting for patches 3-4 is
noisier moderate load in 70-79 °C because switch-on drops from 80 °C
to 70 °C (30 s mid-cluster load peaking at 75 °C: 91 interrupts and
259 ms kworker time vs 26 interrupts and 7 ms on base).
- Patches 3-4 together via the thermal tree (with an Ack on patch 3
from the Samsung/ACPM maintainers, or via an immutable branch):
patch 4 does not build without patch 3, so they must travel
together. Tested alone on the unmodified base DT, patches 3-4 stop
the storm (see tables above; separately, 3 boot interrupts at 105 s
uptime and 0 during 30 s mid-cluster load), while power_allocator
stays throttled hard until patch 2 lands.
- Patches 1,3-4 (if patch 2 were held): step_wise is no worse than
base with the 115 °C critical margin, and power_allocator keeps
throttling hard until patch 2 lands.
Prerequisites:
- thermal/drivers/samsung/acpm-tmu: Fix spurious CPU throttling (v3)
https://lore.kernel.org/r/20261125173959.2198116-1-christian.loehle@xxxxxxx
Patch 4 builds on its slot 7 handling.
Tested on Pixel 6 (Oriole) with the step_wise and power_allocator
governors and with load on two and on all eight cores, on a non-debug
kernel and on a debug kernel with KASAN and lockdep. The debug kernel
had these pending series applied on top:
- usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator
fixes (v3)
https://lore.kernel.org/r/20261130-max77759-wait-v3-0-1ee9034dd228@xxxxxxxxxx
- pinctrl: samsung: keep bus clock enabled (v2)
https://lore.kernel.org/r/20261130-samsung-pinctrl-busclk-v2-1-52e7897cd54e@xxxxxxxxxx
- phy: samsung-ufs: fix gs101 OOB read and use counted config tables
https://lore.kernel.org/r/20261127-gs101-ufs-phy-oob-v1-0-144b0e04c3a8@xxxxxxxxxx
Without them, a lockdep report in tcpci_maxim or a KASAN report in the
UFS PHY driver switches lock debugging off during boot.
Not tested: suspend/resume, Pixel 6 Pro (Raven) and probes colder than
about 10 °C.
Cheers
Andre'
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
André Draszik (4):
arm64: dts: exynos: gs101: raise critical trips
arm64: dts: exynos: gs101: tune CPU thermal zones
firmware: samsung: acpm: add TMU set_hysteresis op
thermal/drivers/samsung: acpm-tmu: fix IRQ storm
arch/arm64/boot/dts/exynos/google/gs101-tmu.dtsi | 23 ++--
drivers/firmware/samsung/exynos-acpm-tmu.c | 29 ++++-
drivers/firmware/samsung/exynos-acpm-tmu.h | 3 +
drivers/firmware/samsung/exynos-acpm.c | 1 +
drivers/thermal/samsung/acpm-tmu.c | 138 +++++++++++++++------
.../linux/firmware/samsung/exynos-acpm-protocol.h | 3 +
6 files changed, 140 insertions(+), 57 deletions(-)
---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20261127-b4-acpm-tmu-irq-storm-dc0fabb5e387
prerequisite-message-id: <20261125173959.2198116-1-christian.loehle@xxxxxxx>
prerequisite-patch-id: e76cca78612886c74f766e2724c499e67208fcae
Best regards,
--
André Draszik <andre.draszik@xxxxxxxxxx>