mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "zhenglifeng (A)" <zhenglifeng1@huawei.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Nicholas Chin <nic.c3.14@gmail.com>,
	<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
	<rafael.j.wysocki@intel.com>, <vincent.guittot@linaro.org>
Subject: Re: [PATCH] cpufreq: acpi: Don't enable boost on policy exit
Date: Mon, 21 Apr 2025 15:45:16 +0800	[thread overview]
Message-ID: <b135ad48-fa77-4455-b83a-92a6367bfacc@huawei.com> (raw)
In-Reply-To: <20250421062003.lbxdxhlp6ulnjq7f@vireshk-i7>

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.
> 


  reply	other threads:[~2025-04-21  7:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16  5:29 Viresh Kumar
2025-04-16  8:47 ` zhenglifeng (A)
2025-04-16 12:38   ` Rafael J. Wysocki
2025-04-17  1:54 ` Nicholas Chin
2025-04-17  5:02   ` Viresh Kumar
2025-04-17  5:09     ` Viresh Kumar
2025-04-17 12:39       ` Rafael J. Wysocki
2025-04-17 15:53         ` Rafael J. Wysocki
2025-04-18  5:58           ` Viresh Kumar
2025-04-18 17:06             ` Nicholas Chin
2025-04-18 19:28               ` Rafael J. Wysocki
2025-04-19  7:54                 ` Viresh Kumar
2025-04-19  9:35                   ` zhenglifeng (A)
2025-04-21  6:20                     ` Viresh Kumar
2025-04-21  7:45                       ` zhenglifeng (A) [this message]
2025-04-21 11:37                     ` Viresh Kumar
2025-04-21 13:36                       ` zhenglifeng (A)
2025-04-22  9:41                         ` Viresh Kumar
2025-04-22 12:05                           ` zhenglifeng (A)
2025-04-17 12:36     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b135ad48-fa77-4455-b83a-92a6367bfacc@huawei.com \
    --to=zhenglifeng1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nic.c3.14@gmail.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®