From: Peter Zijlstra <peterz@infradead.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
x86 Maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>, Len Brown <lenb@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@suse.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
"Gautham R. Shenoy" <gautham.shenoy@amd.com>,
Ingo Molnar <mingo@redhat.com>,
Todd Brandt <todd.e.brandt@linux.intel.com>
Subject: Re: [PATCH v1 0/2] x86/smp: Fix power regression introduced by commit 96040f7273e2
Date: Wed, 28 May 2025 15:38:07 +0200 [thread overview]
Message-ID: <20250528133807.GC39944@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJZ5v0i=TWMjPKxGa8eT-prV=dtQo=pwys5amcj3QL9qo=EYyQ@mail.gmail.com>
On Wed, May 28, 2025 at 03:20:16PM +0200, Rafael J. Wysocki wrote:
> On Wed, May 28, 2025 at 3:18 PM Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > On Wed, May 28, 2025 at 02:53:13PM +0200, Rafael J. Wysocki wrote:
> > > Hi Everyone,
> > >
> > > Commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()")
> > > that shipped in 6.15 introduced a nasty power regression on systems that
> > > start with "nosmt" in the kernel command line which prevents it from entering
> > > deep package idle states (for instance, PC10) later on. Idle power, including
> > > power in suspend-to-idle, goes up significantly on those systems as a result.
> > >
> > > Address this by reverting commit 96040f7273e2 (patch [1/2]) and using a
> > > different approach, which is to retain mwait_play_dead_cpuid_hint() and
> > > still prefer it to hlt_play_dead() in case it is needed when cpuidle is
> > > not available, but prefer cpuidle_play_dead() to it by default (patch [2/2]).
> >
> > I don't understand. The revert says the reason it regresses is that it
> > goes into play_dead before cpuidle is initialized. The fix is then to
> > call cpuidle first.
> >
> > But if cpuidle isn't initialized yet, how does that fix anything?
>
> The revert fixes the bug.
This is not what I asked.
> The other patch does what the reverted commit was supposed to be
> doing, but differently.
No, it does not.
The whole point was that mwait_play_dead did not DTRT because hints are
stupid and it could not select the deepest C state in an unambiguous
fashion.
And now you're restoring that -- code you all argued was fundamentally
buggered.
Yes is 'fixes' things on old platforms, but it is equally broken on the
new platforms where you all argued it was broken on. So either way
around you're going to need to fix those, and this isn't it.
Now, SMT siblings are all AP, by definition. So can't we simply send
them INIT instead of doing CLI;HLT, that way they drop into
Wait-for-SIPI and the ucode can sort it out?
next prev parent reply other threads:[~2025-05-28 13:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 12:53 [PATCH v1 0/2] x86/smp: Fix power regression introduced by commit 96040f7273e2 Rafael J. Wysocki
2025-05-28 12:53 ` [PATCH v1 1/2] Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" Rafael J. Wysocki
2025-05-28 12:54 ` [PATCH v1 2/2] x86/smp: Prefer cpuidle_play_dead() to mwait_play_dead_cpuid_hint() Rafael J. Wysocki
2025-05-28 13:17 ` [PATCH v1 0/2] x86/smp: Fix power regression introduced by commit 96040f7273e2 Peter Zijlstra
2025-05-28 13:20 ` Rafael J. Wysocki
2025-05-28 13:38 ` Peter Zijlstra [this message]
2025-05-28 14:25 ` Rafael J. Wysocki
2025-05-28 16:05 ` Peter Zijlstra
2025-05-28 17:09 ` Rafael J. Wysocki
2025-05-29 8:53 ` Peter Zijlstra
2025-05-29 9:38 ` Rafael J. Wysocki
2025-05-30 8:07 ` Peter Zijlstra
2025-05-30 9:18 ` Rafael J. Wysocki
2025-05-30 9:27 ` Rafael J. Wysocki
2025-05-30 16:59 ` Rafael J. Wysocki
2025-05-30 17:55 ` Rafael J. Wysocki
2025-05-29 13:40 ` [PATCH v2] Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()" Rafael J. Wysocki
2025-05-29 14:25 ` Dave Hansen
2025-05-29 15:39 ` 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=20250528133807.GC39944@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=artem.bityutskiy@linux.intel.com \
--cc=bp@suse.de \
--cc=dave.hansen@linux.intel.com \
--cc=gautham.shenoy@amd.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=todd.e.brandt@linux.intel.com \
--cc=x86@kernel.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