[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424072728.bbcbbcxv7x4cumck@vireshk-i7>
Date: Thu, 24 Apr 2025 12:57:28 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Lifeng Zheng <zhenglifeng1@...wei.com>, linux-pm@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Nicholas Chin <nic.c3.14@...il.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] cpufreq: acpi: Re-sync CPU boost state on system
resume
On 23-04-25, 16:59, Rafael J. Wysocki wrote:
> On Wed, Apr 23, 2025 at 4:40 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
> > > IIUC policy->boost_enabled is false at this point, so say that
> > > boost_state(cpu) returns true and say cpufreq_boost_enabled() returns
> > > false.
> >
> > This cannot happen for CPU 0 because of acpi_cpufreq_boost_init() ->
Right.
> > > cpufreq_online() will see policy->boost_enabled ==
> > > cpufreq_boost_enabled(), so it won't do anything regarding boost, and
> > > say that this happens for all online CPUs.
> >
> > -> so if boost_state(0) returns true, policy->boost_enabled will be
> > set for all policies to start with due to the code in
> > cpufreq_online(), but this is far from obvious.
> > I would at least say in the changelog that set_boost() need not be
> > called directly at the policy initialization time because of the
> > above.
Sure.
> I also think that acpi_cpufreq_resume() may be a better place for
> re-syncing the boost state with policy->boost_enabled because it may
> do that for CPU 0 as well as for the non-boot CPUs.
I thought about that but kept this in acpi_cpufreq_cpu_init() as there
are other corner cases too. A simple CPU hotplug (without
suspend/resume) for example. In that case exit/init will get called
but not resume.
--
viresh
Powered by blists - more mailing lists