Re: [PATCHv3] thermal/drivers/samsung/acpm-tmu: Fix spurious CPU throttling
From: Tudor Ambarus
Date: Thu Nov 26 2026 - 09:44:11 EST
On 11/26/26 1:51 PM, Alexey Klimov wrote:
> On Thu, 26 Nov 2026 at 10:50, Christian Loehle <christian.loehle@xxxxxxx> wrote:
>>
>> On 11/26/26 09:16, Alexey Klimov wrote:
>>> Hi Christian, Tudor,
>>>
>>> On Wed, 25 Nov 2026 at 17:40, Christian Loehle <christian.loehle@xxxxxxx> wrote:
>>>>
>>>> acpm_tmu_set_trips() supplies two thresholds, but the ACPM command writes
>>>> all eight slots, zero-filling the rest. On GS101, slot 7 limits CPU clocks
>>>> independently of its interrupt mask. Setting it to 0 C limits all three
>>>> clusters to about 200 MHz while cpufreq reports the requested frequencies.
>>>> This was found through trial and error while tracking EAS regressions.
>>>
>>> Cpufreq reports the requested frequencies — are these cached values
>>> being reported?
>>> Or is this what the kernel gets via the ACPM call?
>>
>> Requested frequencies are reported. The 200MHz I only deduced from PMU counters.
>
> Tudor, your thoughts?
> Is ACPM reporting an incorrect rate or are those cached values?
Both. I checked with debug prints in cpufreq:
- scaling_cur_freq returns the cached policy->cur.
- cpuinfo_cur_freq gets the freq via ACPM call. The value always matched
policy->cur
So ACPM reports the DVFS level it was asked to set, not the throttled
clock. With the hot trip lowered via sysfs so that the slot 7 throttle
engages, on the X1 (cpu6):
zone cycles/s (perf) scaling_cur_freq cpuinfo_cur_freq
68 C 0.85-1.21 GHz 2802000 2802000
Without throttling, the three agree (e.g. 2.19 GHz measured, 2188000
reported).
It would be good to specify in the commit message that the governors
don't see the throttle. Something like:
Program slot 7 from the lowest hot trip. Above that temperature the
firmware throttles the CPU clusters on its own, without cpufreq or the
thermal governors noticing, so the hot trip must stay above the range
where the governors regulate. This matches the downstream setup.
Cheers,
ta