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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250120082723.am7rxujmdvzz4eky@vireshk-i7>
Date: Mon, 20 Jan 2025 13:57:23 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Lifeng Zheng <zhenglifeng1@...wei.com>
Cc: rafael@...nel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, linuxarm@...wei.com,
	jonathan.cameron@...wei.com, zhanjie9@...ilicon.com,
	lihuisong@...wei.com, fanghao11@...wei.com
Subject: Re: [PATCH v2 1/4] cpufreq: Fix re-boost issue after hotplugging a
 cpu

Hi,

I am bit confused by the sequence of events here and need some
clarification. Lets assume that CPU can go from 1 GHz to 1.5 GHz
without boost enabled and with boost it can go to 2 GHz.

On 17-01-25, 18:14, Lifeng Zheng wrote:
> It turns out that cpuX will stay on the base frequency after performing
> these operations:
> 
> 1. boost all cpus: echo 1 > /sys/devices/system/cpu/cpufreq/boost

Boost enabled here, max_freq_req = 2 GHz.

> 2. offline the cpu: echo 0 > /sys/devices/system/cpu/cpuX/online
> 
> 3. deboost all cpus: echo 0 > /sys/devices/system/cpu/cpufreq/boost
> 
> 4. online the cpu: echo 1 > /sys/devices/system/cpu/cpuX/online

Boost is disabled currently here, but max_freq_req = 2 GHz, which is
incorrect and the current change you are proposing fixes it I think.
But it is not what you are claiming to fix.

> 5. boost all cpus again: echo 1 > /sys/devices/system/cpu/cpufreq/boost

Boost enabled again here, and max_freq_req = 2 GHz is the correct
value.

So the CPU doesn't stay at base frequency here, but 2 GHz only.

> This is because max_freq_req of the policy is not updated during the online
> process, and the value of max_freq_req before the last offline is retained.

which was 2 GHz in your example.

> When the CPU is boosted again, freq_qos_update_request() will do nothing
> because the old value is the same as the new one. This causes the CPU stay
> on the base frequency. Update max_freq_req  in cpufreq_online() will solve
> this problem.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ