lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250619064841.ksab7dilht43thaz@vireshk-i7>
Date: Thu, 19 Jun 2025 12:18:41 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Robin Murphy <robin.murphy@....com>
Cc: Christian Loehle <christian.loehle@....com>,
	"zhenglifeng (A)" <zhenglifeng1@...wei.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-pm <linux-pm@...r.kernel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH] cpufreq: Fix initialization with disabled boost

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ