[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b135ad48-fa77-4455-b83a-92a6367bfacc@huawei.com>
Date: Mon, 21 Apr 2025 15:45:16 +0800
From: "zhenglifeng (A)" <zhenglifeng1@...wei.com>
To: Viresh Kumar <viresh.kumar@...aro.org>
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 2025/4/21 14:20, Viresh Kumar wrote:
> 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.
I see. Then I think the key is how to distinguish CPU offline/online and
suspend/resume in cpufreq_online().
>
>> 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.
>
Powered by blists - more mailing lists