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: <20250421062003.lbxdxhlp6ulnjq7f@vireshk-i7>
Date: Mon, 21 Apr 2025 11:50:03 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
	Nicholas Chin <nic.c3.14@...il.com>, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, rafael.j.wysocki@...el.com,
	vincent.guittot@...aro.org
Subject: Re: [PATCH] cpufreq: acpi: Don't enable boost on policy exit

On 19-04-25, 17:35, zhenglifeng (A) wrote:
> Yes, the policy boost will be forcibly set to mirror the global boost. This
> indicates that the global boost value is the default value of policy boost
> each time the CPU goes online. Otherwise, we'll meet things like:
> 
> 1. The global boost is set to disabled after a CPU going offline but the
> policy boost is still be enabled after the CPU going online again.
> 
> 2. The global boost is set to enabled after a CPU going offline and the
> rest of the online CPUs are all boost enabled. However, the offline CPU
> remains in the boost disabled state after it going online again. Users
> have to set its boost state separately.

I agree that both of these are valid issues, but so is retaining state
across suspend/resume too.. There is a difference in a user manually
removing a CPU (offline) and suspend/resume.

With a manual offline operation, the code in cpufreq_online() is doing
the right thing, default to global boost. But the user configuration
shouldn't change with just suspend resume.

> IMV, a user set the global boost means "I want all policy boost/unboost",
> every CPU going online after that should follow this order. So I think
> the code in cpufreq_online() is doing the right thing.

Yes, but any change to policy->boost after that must also be honored.

> BTW, I think there is optimization can be done in
> cpufreq_boost_trigger_state(). Currently, Nothing will happend if users set
> global boost flag to true when this flag is already true. But I think it's
> better to set all policies to boost in this situation. It might make more
> sense to think of this as a refresh operation. This is just my idea. I'd
> like to hear your opinion.

Makes sense.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ