lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260123114743.1616900-1-tianyaxiong@kylinos.cn>
Date: Fri, 23 Jan 2026 19:47:43 +0800
From: Yaxiong Tian <tianyaxiong@...inos.cn>
To: tglx@...nel.org,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com,
	x86@...nel.org,
	hpa@...or.com,
	srinivas.pandruvada@...ux.intel.com,
	lenb@...nel.org,
	rafael@...nel.org,
	viresh.kumar@...aro.org,
	ricardo.neri-calderon@...ux.intel.com
Cc: linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org,
	Yaxiong Tian <tianyaxiong@...inos.cn>
Subject: [PATCH 2/3] cpufreq: intel_pstate: Remove refresh logic in hybrid_init_cpu_capacity_scaling()

Users can disable SMT (Simultaneous Multi-Threading) via
/sys/devices/system/cpu/smt, meaning that CPU hybrid capabilities
and related features like EAS (Energy Aware Scheduling) may become
dynamically eligible. Since the driver provides sysfs interfaces
for cpufreq_driver switching, merely performing a refresh is
insufficient.

To address this issue, remove the refresh-related logic.

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

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ec4abe374573..76fb79b8068a 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1140,22 +1140,12 @@ static void hybrid_refresh_cpu_capacity_scaling(void)
 	hybrid_register_all_perf_domains();
 }
 
-static void hybrid_init_cpu_capacity_scaling(bool refresh)
+static void hybrid_init_cpu_capacity_scaling(void)
 {
 	/* Bail out if enabling capacity-aware scheduling is prohibited. */
 	if (no_cas)
 		return;
 
-	/*
-	 * If hybrid_max_perf_cpu is set at this point, the hybrid CPU capacity
-	 * scaling has been enabled already and the driver is just changing the
-	 * operation mode.
-	 */
-	if (refresh) {
-		hybrid_refresh_cpu_capacity_scaling();
-		return;
-	}
-
 	/*
 	 * On hybrid systems, use asym capacity instead of ITMT, but because
 	 * the capacity of SMT threads is not deterministic even approximately,
@@ -1171,18 +1161,6 @@ static void hybrid_init_cpu_capacity_scaling(bool refresh)
 	}
 }
 
-static bool hybrid_clear_max_perf_cpu(void)
-{
-	bool ret;
-
-	guard(mutex)(&hybrid_capacity_lock);
-
-	ret = !!hybrid_max_perf_cpu;
-	hybrid_max_perf_cpu = NULL;
-
-	return ret;
-}
-
 static void __intel_pstate_get_hwp_cap(struct cpudata *cpu)
 {
 	u64 cap;
@@ -3428,7 +3406,6 @@ static void intel_pstate_driver_cleanup(void)
 
 static int intel_pstate_register_driver(struct cpufreq_driver *driver)
 {
-	bool refresh_cpu_cap_scaling;
 	int ret;
 
 	if (driver == &intel_pstate)
@@ -3441,8 +3418,6 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)
 
 	arch_set_max_freq_ratio(global.turbo_disabled);
 
-	refresh_cpu_cap_scaling = hybrid_clear_max_perf_cpu();
-
 	intel_pstate_driver = driver;
 	ret = cpufreq_register_driver(intel_pstate_driver);
 	if (ret) {
@@ -3452,7 +3427,7 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)
 
 	global.min_perf_pct = min_perf_pct_min();
 
-	hybrid_init_cpu_capacity_scaling(refresh_cpu_cap_scaling);
+	hybrid_init_cpu_capacity_scaling();
 
 	return 0;
 }
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ