From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Yicong Yang <yangyicong@huawei.com>,
catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com,
tglx@linutronix.de, peterz@infradead.org, mpe@ellerman.id.au,
linux-arm-kernel@lists.infradead.org, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com,
pierre.gondois@arm.com
Cc: linuxppc-dev@lists.ozlabs.org, x86@kernel.org,
linux-kernel@vger.kernel.org, morten.rasmussen@arm.com,
msuchanek@suse.de, gregkh@linuxfoundation.org, rafael@kernel.org,
jonathan.cameron@huawei.com, prime.zeng@hisilicon.com,
linuxarm@huawei.com, yangyicong@hisilicon.com, xuwei5@huawei.com,
guohanjun@huawei.com, sshegde@linux.ibm.com
Subject: Re: [PATCH v12 2/4] arch_topology: Support SMT control for OF based system
Date: Mon, 17 Mar 2025 10:56:43 +0100 [thread overview]
Message-ID: <2bd3aa0a-d700-46bf-81d1-a5fb0364d1e0@arm.com> (raw)
In-Reply-To: <20250311075143.61078-3-yangyicong@huawei.com>
On 11/03/2025 08:51, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@hisilicon.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.
Here we still have a little misunderstanding. IMHO, even on such a
system 2) would work too.
My qemu example with SMT-1, SMT-2 and SMT-4 in one system from your v11:
# cat /proc/schedstat | grep -v "^v\|^t" | awk '{print $1" "$2" "$3}'
cpu0 0 0
domain0 MC ff
cpu1 0 0
domain0 MC ff
cpu2 0 0
domain0 SMT 0c
domain1 MC ff
cpu3 0 0
domain0 SMT 0c
domain1 MC ff
cpu4 0 0
domain0 SMT f0
domain1 MC ff
cpu5 0 0
domain0 SMT f0
domain1 MC ff
cpu6 0 0
domain0 SMT f0
domain1 MC ff
cpu7 0 0
domain0 SMT f0
domain1 MC ff
# cat /proc/cpuinfo | grep ^processor
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
# echo 1 > /sys/devices/system/cpu/smt/control
# cat /proc/cpuinfo | grep ^processor
processor : 0
processor : 1
processor : 2
processor : 4
# echo 4 > /sys/devices/system/cpu/smt/control
# cat /proc/cpuinfo | grep ^processor
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
Whats doesn't work is to echoing a '2' but that's not
'max_thread_number' of the system.
[...]
next prev parent reply other threads:[~2025-03-17 9:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 7:51 [PATCH v12 0/4] Support SMT control on arm64 Yicong Yang
2025-03-11 7:51 ` [PATCH v12 1/4] cpu/SMT: Provide a default topology_is_primary_thread() Yicong Yang
2025-03-11 14:41 ` Sudeep Holla
2025-03-11 7:51 ` [PATCH v12 2/4] arch_topology: Support SMT control for OF based system Yicong Yang
2025-03-11 14:42 ` Sudeep Holla
2025-03-13 9:16 ` Jonathan Cameron
2025-03-17 9:56 ` Dietmar Eggemann [this message]
2025-03-17 11:29 ` Yicong Yang
2025-03-17 16:18 ` Dietmar Eggemann
2025-03-11 7:51 ` [PATCH v12 3/4] arm64: topology: Support SMT control on ACPI " Yicong Yang
2025-03-11 14:42 ` Sudeep Holla
2025-03-11 7:51 ` [PATCH v12 4/4] arm64: Kconfig: Enable HOTPLUG_SMT Yicong Yang
2025-03-11 14:41 ` Sudeep Holla
2025-03-11 14:41 ` [PATCH v12 0/4] Support SMT control on arm64 Sudeep Holla
2025-03-14 18:37 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2bd3aa0a-d700-46bf-81d1-a5fb0364d1e0@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=guohanjun@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=peterz@infradead.org \
--cc=pierre.gondois@arm.com \
--cc=prime.zeng@hisilicon.com \
--cc=rafael@kernel.org \
--cc=sshegde@linux.ibm.com \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xuwei5@huawei.com \
--cc=yangyicong@hisilicon.com \
--cc=yangyicong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®