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: <b9c9eb84-04a9-4a16-9a31-df8216f3460b@kylinos.cn>
Date: Mon, 26 Jan 2026 10:15:09 +0800
From: Yaxiong Tian <tianyaxiong@...inos.cn>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
 srinivas.pandruvada@...ux.intel.com, lenb@...nel.org,
 viresh.kumar@...aro.org, linux-pm@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: intel_pstate: Disable SMT when hybrid systems
 are enabled


在 2026/1/24 04:12, Rafael J. Wysocki 写道:
> On Fri, Jan 23, 2026 at 2:20 AM Yaxiong Tian <tianyaxiong@...inos.cn> wrote:
>>
>> 在 2026/1/22 23:55, Ricardo Neri 写道:
>>> On Mon, Jan 19, 2026 at 03:41:18PM +0800, Yaxiong Tian wrote:
>>>> 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.
>>> Indeed I was able to enable SMT siblings:
>>>
>>>        $ echo on > /sys/devices/system/cpu/smt
>>>        $ echo 1 > /sys/devices/system/cpu/cpu1/online
>>>
>>>> To resolve this confusion, permanently disable SMT by calling
>>>> cpuhp_smt_disable().
>>> IMHO, the user should be able to enable SMT back if she or he chooses to. Instead,
>>> the sched domains should be rebuilt with asym packing and without asymmetric
>>> capacity.
>> Yes, I also agree with this viewpoint.
> I don't agree though.
>
>> I think a better solution is to
>> place it within cpufreq online for heterogeneous judgment and to clearly
>> address sched domain rebuilt and asymmetry issues.
> Maybe in theory, but in practice the EAS-related code in intel_pstate
> really only targets systems with no SMT.
>
> While it is possible to use it on SMT systems with SMT disabled, I
> really wouldn't recommend doing that beyond debug/diagnostics and no,
> it is not sufficient to disable stuff when SMT is re-enabled, you'd
> basically need to unregister the driver and register it from scratch
> in that case.
Thank you for your explanation. It seems I didn’t read the document 
carefully enough before.

>
>> I ran some tests the
>> day before yesterday and encountered a few locking problems. I will
>> publish the patch a bit later.
> Given the complexity involved, I don't think it is worth the effort.
>
> I can apply this patch though.

Um, although I've already done it, I agree with your point.

Besides, I don't think this patch is very suitable either, because I 
supposethat on a n system without SMT, the SMT-related|/sys|interface 
should indicate unsupported (though I don't have such a machine).

Moreover, based on the previous discussion, would it be more appropriate 
to use !cpu_smt_possible() instead of !sched_smt_active()? After all, 
the original design was intended for systems without SMT. If you also 
agree with this perspective, I can test it on a machine with SMT.




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ