Re: [PATCH] cpufreq: acpi: Don't enable boost on policy exit
From: Rafael J. Wysocki
Date: Thu Apr 17 2025 - 08:40:03 EST
On Thu, Apr 17, 2025 at 7:09 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> Copying more information from Bugzilla here (Nicholas, it would be
> faster if you can put all your observations here first, more people
> are looking at emails than bugzilla).
>
> > Nicholas Chin wrote:
> > I did some more testing and debugging and it seems like when
> > cpufreq_online() runs after waking the system, policy->boost_enabled
> > and cpufreq_boost_enabled() are both 0, so the set_boost() at the end
> > of that function is never run.
>
> Right, this is what I wanted to do with the $Subject patch. Don't
> update boost anymore in suspend/resume
This is going to work for suspend-to-idle, but not necessarily for S3.
BTW, the patch is correct IMV, so I'm not going to drop it, but it
looks like something more is needed on top of it.
> > cpufreq_boost_enabled() being 0 indicates that the MSR has boosting
> > disabled, but when I read out that MSR using rdmsr the bit seems to
> > indicate that it is actually enabled (I am aware of the inverted logic
> > of that bit). set_boost() seems to be the only place in the kernel
> > that causes that MSR to be modified, and I didn't see any extra calls
> > to it in my debug logs, so it seems like something else (outside the
> > kernel?) is setting that MSR.
>
> And this is what I feel too, something else in kernel or outside of it
> is doing something tricky.
On a resume from S3, you actually don't know if the platform firmware
has preserved the configuration from before the suspend transition.
It may not.