mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq: intel_pstate: Disable SMT when hybrid systems are enabled
@ 2026-01-19  7:41 Yaxiong Tian
  2026-01-22 15:55 ` Ricardo Neri
  0 siblings, 1 reply; 7+ messages in thread
From: Yaxiong Tian @ 2026-01-19  7:41 UTC (permalink / raw)
  To: srinivas.pandruvada, lenb, rafael, viresh.kumar, ricardo.neri-calderon
  Cc: linux-pm, linux-kernel, Yaxiong Tian

When hwp_is_hybrid && !sched_smt_active(), the driver enables
hybrid_capacity_scale and disables ITMT. According to the original code
logic, these related actions are one-time operations; therefore, I
believe the original design intent did not support dynamic runtime
switching.

However, SMT can be toggled via related interfaces in /sys. When SMT is
enabled, the system is no longer hybrid, and the original settings become
incorrect.

To resolve this confusion, permanently disable SMT by calling
cpuhp_smt_disable().

Fixes: 929ebc93ccaa ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems")
Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>
---
 drivers/cpufreq/intel_pstate.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ec4abe374573..d0274a3ece2d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1163,6 +1163,11 @@ static void hybrid_init_cpu_capacity_scaling(bool refresh)
 	 */
 	if (hwp_is_hybrid && !sched_smt_active() && arch_enable_hybrid_capacity_scale()) {
 		hybrid_refresh_cpu_capacity_scaling();
+		/*
+		 * Permanently disable SMT to prevent confusion caused by users
+		 * enabling SMT via /sys.
+		 */
+		cpuhp_smt_disable(CPU_SMT_FORCE_DISABLED);
 		/*
 		 * Disabling ITMT causes sched domains to be rebuilt to disable asym
 		 * packing and enable asym capacity and EAS.
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-28  3:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-19  7:41 [PATCH] cpufreq: intel_pstate: Disable SMT when hybrid systems are enabled Yaxiong Tian
2026-01-22 15:55 ` Ricardo Neri
2026-01-23  1:20   ` Yaxiong Tian
2026-01-23 20:12     ` Rafael J. Wysocki
2026-01-26  2:15       ` Yaxiong Tian
2026-01-27 16:08         ` Rafael J. Wysocki
2026-01-28  3:24           ` Yaxiong Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®