Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 29 May 2025 13:40:43 +0000 (15:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 29 May 2025 15:34:18 +0000 (17:34 +0200)
commit70523f335734b0b42f97647556d331edf684c7dc
treefc58afc64b98604004a51638effc3759b9dcf633
parent39cdf87a97fdab067e82138ad4611b764f3eae15
Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"

Revert commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()")
because it introduced a significant power regression on systems that
start with "nosmt" in the kernel command line.

Namely, on such systems, SMT siblings permanently go offline early,
when cpuidle has not been initialized yet, so after the above commit,
hlt_play_dead() is called for them.  Later on, when the processor
attempts to enter a deep package C-state, including PC10 which is
requisite for reaching minimum power in suspend-to-idle, it is not
able to do that because of the SMT siblings staying in C1 (which
they have been put into by HLT).

As a result, the idle power (including power in suspend-to-idle)
rises quite dramatically on those systems with all of the possible
consequences, which (needless to say) may not be expected by their
users.

This issue is hard to debug and potentially dangerous, so it needs to
be addressed as soon as possible in a way that will work for 6.15.y,
hence the revert.

Of course, after this revert, the issue that commit 96040f7273e2
attempted to address will be back and it will need to be fixed again
later.

Fixes: 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()")
Reported-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Tested-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Cc: 6.15+ <stable@vger.kernel.org> # 6.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/12674167.O9o76ZdvQC@rjwysocki.net
arch/x86/kernel/smpboot.c