[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250313091611.00003ccf@huawei.com>
Date: Thu, 13 Mar 2025 09:16:11 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Yicong Yang <yangyicong@...wei.com>
CC: <catalin.marinas@....com>, <will@...nel.org>, <sudeep.holla@....com>,
<tglx@...utronix.de>, <peterz@...radead.org>, <mpe@...erman.id.au>,
<linux-arm-kernel@...ts.infradead.org>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <pierre.gondois@....com>,
<dietmar.eggemann@....com>, <linuxppc-dev@...ts.ozlabs.org>,
<x86@...nel.org>, <linux-kernel@...r.kernel.org>, <morten.rasmussen@....com>,
<msuchanek@...e.de>, <gregkh@...uxfoundation.org>, <rafael@...nel.org>,
<prime.zeng@...ilicon.com>, <linuxarm@...wei.com>,
<yangyicong@...ilicon.com>, <xuwei5@...wei.com>, <guohanjun@...wei.com>,
<sshegde@...ux.ibm.com>
Subject: Re: [PATCH v12 2/4] arch_topology: Support SMT control for OF based
system
On Tue, 11 Mar 2025 15:51:41 +0800
Yicong Yang <yangyicong@...wei.com> wrote:
> From: Yicong Yang <yangyicong@...ilicon.com>
>
> On building the topology from the devicetree, we've already gotten the
> SMT thread number of each core. Update the largest SMT thread number
> and enable the SMT control by the end of topology parsing.
>
> The framework's SMT control provides two interface to the users [1]
> through /sys/devices/system/cpu/smt/control:
> 1) enable SMT by writing "on" and disable by "off"
> 2) enable SMT by writing max_thread_number or disable by writing 1
>
> Both method support to completely disable/enable the SMT cores so both
> work correctly for symmetric SMT platform and asymmetric platform with
> non-SMT and one type SMT cores like:
> core A: 1 thread
> core B: X (X!=1) threads
>
> Note that for a theoretically possible multiple SMT-X (X>1) core
> platform the SMT control is also supported as expected but only
> by writing the "on/off" method.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-devices-system-cpu#n542
> Reviewed-by: Pierre Gondois <pierre.gondois@....com>
> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>
> Signed-off-by: Yicong Yang <yangyicong@...ilicon.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Powered by blists - more mailing lists