From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Alexey Klimov <alexey.klimov@linaro.org>,
Christian Loehle <christian.loehle@arm.com>
Cc: bzolnier@gmail.com, krzk@kernel.org, rafael@kernel.org,
daniel.lezcano@kernel.org, lukasz.luba@arm.com,
linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-pm@vger.kernel.org,
"André Draszik" <andre.draszik@linaro.org>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Juan Yescas" <jyescas@google.com>
Subject: Re: [PATCHv3] thermal/drivers/samsung/acpm-tmu: Fix spurious CPU throttling
Date: Thu, 26 Nov 2026 17:01:45 +0200 [thread overview]
Message-ID: <e329ce21-5a24-4301-9328-917d0ae4fdb1@linaro.org> (raw)
In-Reply-To: <DN586284T46G.271ABU0A683IZ@linaro.org>
On 11/26/26 4:50 PM, Alexey Klimov wrote:
> On Thu Nov 26, 2026 at 2:43 PM GMT, Tudor Ambarus wrote:
>>
>>
>> On 11/26/26 1:51 PM, Alexey Klimov wrote:
>>> On Thu, 26 Nov 2026 at 10:50, Christian Loehle <christian.loehle@arm.com> 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@arm.com> 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.
>
> Ain't that mean that ACPM ->dvfs.set_rate() call doesn't work?
No, set_rate() works. Without throttling, the measured frequency follows
every requested level (1.80/2.25/2.76 GHz at the cluster maxima, 2.19 GHz
for 2188000, and scaling_max_freq caps take effect). FREQ_GET returns the
level that was set; the throttle is applied by hardware below that level.
> I don't remember all the detauls but I think you mentioned that
> downstream doesn't execute set_rate() ACPM call and does the SFR
> (mmio) reads, basically what we have on Exynos850.
>
Downstream sets CPU rates through ACPM as well: cal_dfs_set_rate() calls
exynos_acpm_set_rate() for ACPM vclks and caches the rate in vclk->vrate.
cal_dfs_get_rate() returns that cached value and only asks ACPM when
nothing is cached. So GS101 doesn't need the E850 approach, since its
firmware implements FREQ_GET.
> What about clocks and corresponding PLL clocks?
>
Upstream has no CMU_CPUCLx driver. I'd expect a PLL readback to show the
DVFS level too.
Cheers,
ta
next prev parent reply other threads:[~2026-11-26 15:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 17:39 Christian Loehle
2026-11-26 9:16 ` Alexey Klimov
2026-11-26 10:50 ` Christian Loehle
2026-11-26 11:03 ` Tudor Ambarus
2026-11-26 11:51 ` Alexey Klimov
2026-11-26 14:43 ` Tudor Ambarus
2026-11-26 14:50 ` Alexey Klimov
2026-11-26 15:01 ` Tudor Ambarus [this message]
2026-11-26 15:21 ` Alexey Klimov
2026-11-26 15:55 ` Tudor Ambarus
2026-11-26 15:31 ` Alexey Klimov
2026-11-26 11:33 ` Tudor Ambarus
2026-11-26 12:58 ` André Draszik
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=e329ce21-5a24-4301-9328-917d0ae4fdb1@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=alexey.klimov@linaro.org \
--cc=andre.draszik@linaro.org \
--cc=bzolnier@gmail.com \
--cc=christian.loehle@arm.com \
--cc=daniel.lezcano@kernel.org \
--cc=jyescas@google.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=peter.griffin@linaro.org \
--cc=rafael@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
all inboxes | Powered by JetHome®