mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Yicong Yang <yangyicong@huawei.com>
Cc: 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, yangyicong@hisilicon.com,
	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, 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 17:18:49 +0100	[thread overview]
Message-ID: <c357e638-d523-4cd2-a15f-ed3b0b41bd22@arm.com> (raw)
In-Reply-To: <c88e5b78-37b7-3023-7842-56a93fe119d2@huawei.com>

On 17/03/2025 12:29, Yicong Yang wrote:
> On 2025/3/17 17:56, Dietmar Eggemann wrote:
>> On 11/03/2025 08:51, Yicong Yang wrote:
>>> From: Yicong Yang <yangyicong@hisilicon.com>

[...]

>>> 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.
>>
> 
> 
> yes but only by writing the max_thread_number. e.g. a system with SMT number
> of 1 (no SMT core), X, Y (Y > X), 1 works same as "off" and Y works same as
> "on", as you shown below. write X will be blocked by the CPU framework:
> estuary:/sys/devices/system/cpu/smt$ cat control
> off
> # emulated CPU 0-7,16-22 as SMT-2, CPU 8-11,24-27 as SMT-4
> estuary:/sys/devices/system/cpu/smt$ cat ../online
> 0,2,4,6,8,12-16,18,20,22,24,28-31
> estuary:/sys/devices/system/cpu/smt$ echo 2 > control
> bash: echo: write error: Invalid argument
> estuary:/sys/devices/system/cpu/smt$ echo 4 > control
> estuary:/sys/devices/system/cpu/smt$ cat ../online
> 0-31
> 
> so method 1) will always match the expectation to fully enable/disable the
> SMT on all cores, that's I mean here. But 2) won't work if user expected
> to write 2 to enable SMT-2 (I think it'll will work if we support
> CONFIG_SMT_NUM_THREADS_DYNAMIC on arm64 later).

OK, looks like you're aware of this then. Just saying that technically
'4' would be the max thread number of the system and not '2' so it still
looks OK from this perspective. But OK, we don't have those systems now
anyway.

[...]

  reply	other threads:[~2025-03-17 16:18 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
2025-03-17 11:29     ` Yicong Yang
2025-03-17 16:18       ` Dietmar Eggemann [this message]
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=c357e638-d523-4cd2-a15f-ed3b0b41bd22@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®