Re: [PATCH 0/3] cpufreq: scmi: Add boost frequency support
From: Dietmar Eggemann
Date: Thu Feb 15 2024 - 10:00:56 EST
On 13/02/2024 08:35, Sibi Sankar wrote:
>
>
> On 1/31/24 20:37, Dietmar Eggemann wrote:
>> On 23/01/2024 11:15, Sudeep Holla wrote:
>>> On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote:
>>>> On 17-01-24, 16:34, Sibi Sankar wrote:
[...]
>> root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost
>> 1
>> 0
>> 0
>>
>> root@juno:/sys/devices/system/cpu/cpufreq# cat
>> policy*/scaling_available_frequencies policy*/scaling_boost_frequencies
>> 450000 575000 700000
>> 450000 625000 800000
>> 775000 850000
>> 950000 1100000
>>
>> If I disable system-wide boost I see the correct influence on
>> 'cpufreq_pressure':
>>
>> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost
>>
>> [ 439.466682] cpufreq_update_pressure() cpu=1 cpufreq_pressure=280
>> [ 439.472797] cpufreq_update_pressure() cpu=2 cpufreq_pressure=280
>> [ 439.478889] cpufreq_update_pressure() cpu=0 cpufreq_pressure=79
>> [ 439.484852] cpufreq_update_pressure() cpu=3 cpufreq_pressure=79
>> [ 439.490843] cpufreq_update_pressure() cpu=4 cpufreq_pressure=79
>> [ 439.499621] cpufreq_update_pressure() cpu=5 cpufreq_pressure=79
>>
>> reflecting the max frequency change from '1100000 to 800000' on CPU1,2
>> and from '850000 to 700000' on CPU0,3-5.
>>
>> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost
>>
>> [ 2722.693113] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0
>> [ 2722.699041] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0
>> [ 2722.704962] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0
>> [ 2722.710842] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0
>> [ 2722.719644] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0
>> [ 2722.728224] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0
>>
>> What doesn't work for me is to disable boost per policy:
>>
>> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost
>> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost
>> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy1/boost
>>
>> Here I don't see 'cpufreq_pressure' changes.
>>
>> BTW, what's the use case you have in mind for this feature? Is it to cap
>> high OPPs for CPUs in a certain CPUfreq policy?
>
> Yeah, that's exactly the use case for X1E. Boost frequencies defined in
> the SoC are achievable by only one CPU in a cluster i.e. either the
> other CPUs in the same cluster should be in low power mode or offline.
> So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly
> that the CPUs are running at max possible frequency when it's actually
> running at a lower frequency.
I see.
What about the issue with the settings of the global and the per-policy
'boost' file?
On my Juno-r0 the initial boost values are:
(1) Initial setting:
root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost
1
0
0
Should they not all be 1 ?
(2) Disabling system-wide boost
root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost
Here I see 'cpufreq_pressure > 0' for all CPUs.
(3) Enabling system-wide boost
root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost
And here 'cpufreq_pressure == 0' for all CPUs.
(4) Disabling boost for policy0.
root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost
root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost
1
0
1
Here nothing happened. But I was expecting to see 'cpufreq_pressure > 0'
for CPUs of policy0:
root@juno:/sys/devices/system/cpu/cpufreq# cat policy0/affected_cpus
0 3 4 5