[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohponCr6pwgmK+J0WnvY_VZdDhA738JF18L518A2MKJVQLmw@mail.gmail.com>
Date: Sat, 19 Apr 2025 13:24:38 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: 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, zhenglifeng1@...wei.com
Subject: Re: [PATCH] cpufreq: acpi: Don't enable boost on policy exit
On Sat, 19 Apr 2025 at 00:58, Rafael J. Wysocki <rafael@...nel.org> wrote:
> So it updates policy->boost_enabled in accordance with the current
> setting in the MSR.
Yes.
> IMO it would be better to update the MSR in accordance with
> policy->boost_enabled or users may get confused if their boost
> settings change after a suspend-resume cycle. Or have I got lost
> completely?
I wrote this patch based on the sync that happens at the end of
cpufreq_online():
/* Let the per-policy boost flag mirror the cpufreq_driver
boost during init */
if (cpufreq_driver->set_boost && policy->boost_supported &&
policy->boost_enabled != cpufreq_boost_enabled()) {
policy->boost_enabled = cpufreq_boost_enabled();
ret = cpufreq_driver->set_boost(policy, policy->boost_enabled);
if (ret) {
/* If the set_boost fails, the online
operation is not affected */
pr_info("%s: CPU%d: Cannot %s BOOST\n",
__func__, policy->cpu,
str_enable_disable(policy->boost_enabled));
policy->boost_enabled = !policy->boost_enabled;
}
}
So my patch works as the cpufreq core force-syncs the state at init
(pretty much what the driver was doing before).
Though I now wonder if this code (in cpufreq_online()) is really doing
the right thing or not. So if global boost is enabled before suspend with
policy boost being disabled, the policy boost will be enabled on resume.
--
Viresh
Powered by blists - more mailing lists