public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Yicong Yang <yangyicong@huawei.com>,
	catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com,
	linux-arm-kernel@lists.infradead.org
Cc: yangyicong@hisilicon.com, gregkh@linuxfoundation.org,
	rafael@kernel.org, jonathan.cameron@huawei.com,
	prime.zeng@hisilicon.com, linuxarm@huawei.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch_topology: Support SMT control on arm64
Date: Fri, 22 Sep 2023 13:13:35 +0200	[thread overview]
Message-ID: <2247ced8-c4f9-80a7-a0a2-0953abed135f@arm.com> (raw)
In-Reply-To: <80b2556c-b56c-ca23-22c7-70a0a3995701@huawei.com>

On 21/09/2023 10:56, Yicong Yang wrote:
> On 2023/9/21 1:08, Dietmar Eggemann wrote:
>> On 19/09/2023 14:33, Yicong Yang wrote:
>>> From: Yicong Yang <yangyicong@hisilicon.com>

[...]

> If you manually disable SMT by offline each CPUs the cpu_smt_control will
> not be updated. It'll updated when using the interface like
> `/sys/devices/system/cpu/smt/control` or cmdline. By these means,
> the framework will use topology_is_primary_thread() to decide which CPU
> in the SMT will keep online:
> 
> // e.g. echo off > /sys/devices/system/cpu/smt/control
> [ kernel/cpu.c ]
> control_store()
>   __store_smt_control()
>     cpuhp_smt_disable()
>       for_each_online_cpu(cpu)
>         if (topology_is_primary_thread(cpu))
>           continue;            <---------- will skip the primary thread
>       [...]
>       cpu_smt_control = CPU_SMT_DISABLED;
> 
> topology_is_primary_thread() checking only applies to the SMT control but
> not to the CPU offline.

I see, make sense. Retested on my SMT4 Arm64 server with 256 CPUs.

  reply	other threads:[~2023-09-22 11:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19 12:33 [PATCH] arch_topology: Support SMT control on arm64 Yicong Yang
2023-09-19 23:30 ` kernel test robot
2023-09-20  1:36   ` Yicong Yang
2023-09-20 17:08 ` Dietmar Eggemann
2023-09-21  8:56   ` Yicong Yang
2023-09-22 11:13     ` Dietmar Eggemann [this message]
2023-09-21 15:03 ` Sudeep Holla
2023-09-22  9:46   ` Yicong Yang
2023-09-27 11:53     ` Yicong Yang

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=2247ced8-c4f9-80a7-a0a2-0953abed135f@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=will@kernel.org \
    --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