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] [day] [month] [year] [list]
Message-ID: <CAJZ5v0j_Qz8xFeYc_j4Y0z=RB_iR8-QZC4S01eyomKDf6FGrJw@mail.gmail.com>
Date: Tue, 3 Feb 2026 22:16:51 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Yaxiong Tian <tianyaxiong@...inos.cn>
Cc: rafael@...nel.org, ricardo.neri-calderon@...ux.intel.com, 
	srinivas.pandruvada@...ux.intel.com, viresh.kumar@...aro.org, lenb@...nel.org, 
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2] cpufreq: intel_pstate: Enable asym capacity only when
 cpu smt is not possible

On Tue, Feb 3, 2026 at 3:49 AM Yaxiong Tian <tianyaxiong@...inos.cn> wrote:
>
> According to the description in the intel_pstate.rst documentation,
> Capacity-Aware Scheduling and Energy-Aware Scheduling are only
> supported on a hybrid processor without SMT. Previously, the system
> used sched_smt_active() for judgment, which is not a strict condition
> because users can switch it on or off via /sys at any time.
>
> This could lead to incorrect driver settings in certain scenarios.
>  For example, on a CPU that supports SMT, a user can disable SMT
> via the nosmt parameter to enable asym capacity, and then re-enable
> SMT via /sys. In such cases, some settings in the driver would no
> longer be correct.
>
> To address this issue, replace sched_smt_active() with cpu_smt_possible(),
> and only enable asym capacity when cpu smt is not possible.
>
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index ec4abe374573..1625ec2d0d06 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -1161,7 +1161,7 @@ static void hybrid_init_cpu_capacity_scaling(bool refresh)
>          * the capacity of SMT threads is not deterministic even approximately,
>          * do not do that when SMT is in use.
>          */
> -       if (hwp_is_hybrid && !sched_smt_active() && arch_enable_hybrid_capacity_scale()) {
> +       if (hwp_is_hybrid && !cpu_smt_possible() && arch_enable_hybrid_capacity_scale()) {
>                 hybrid_refresh_cpu_capacity_scaling();
>                 /*
>                  * Disabling ITMT causes sched domains to be rebuilt to disable asym
> --

Applied as 6.20/7.0 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ