Re: [PATCH] cpufreq: Fix initialization with disabled boost
From: Viresh Kumar
Date: Thu Jun 19 2025 - 02:48:53 EST
On 17-06-25, 13:56, Robin Murphy wrote:
> On 17/06/2025 9:20 am, Christian Loehle wrote:
> > so calling policy_set_boost(policy, enable) is a noop here if
> > policy->boost_enabled == cpufreq_boost_enabled():
> >
> > if (policy->boost_enabled == enable)
> > return 0;
> >
> > We have policy->boost_enabled == false on boot, thus never actually
> > setting policy->max up ever, which leads to the following:
> And for clarity, this is with the cpufreq_dt driver (at least in my case).
> > # cat /sys/devices/system/cpu/cpufreq/policy4/scaling_boost_frequencies
> > 2016000
> > # cat /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
> > 2016000
> > # cat /sys/devices/system/cpu/cpufreq/boost
> > 0
> > # echo 1 > /sys/devices/system/cpu/cpufreq/boost
> > # echo 0 > /sys/devices/system/cpu/cpufreq/boost
> > # cat /sys/devices/system/cpu/cpufreq/policy4/scaling_boost_frequencies
> > 1800000
Hi Christian and Robin,
I am not clear on why this happens. It would be helpful to get a few answers
here:
- Which driver are you using Christian ?
- Is this during system boot or suspend/resume ?
- At boot you see the boost state as 0, while policy->max uses it ?
I tried this with cpufreq-dt driver and this is what I see on boot:
# grep . /sys/devices/system/cpu/cpufreq/policy0/*
/sys/devices/system/cpu/cpufreq/policy0/affected_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/boost:0
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq:24000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_max_freq:960000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_min_freq:208000
/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_transition_latency:900000
/sys/devices/system/cpu/cpufreq/policy0/related_cpus:0 1 2 3
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies:208000 432000 729000 960000
/sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors:ondemand userspace performance schedutil
/sys/devices/system/cpu/cpufreq/policy0/scaling_boost_frequencies:1200000
/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:208000
/sys/devices/system/cpu/cpufreq/policy0/scaling_driver:cpufreq-dt
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:schedutil
/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:960000
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:208000
/sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed:<unsupported>
# grep . /sys/devices/system/cpu/cpufreq/boost
0
So both global and policy boost are disabled and they don't show up in
scaling_max_freq or scaling_available_frequencies.
--
viresh