lkml.org 
[lkml]   [2023]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] arch_topology: Support SMT control on arm64
From
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.

\
 
 \ /
  Last update: 2023-09-22 16:30    [W:0.038 / U:1.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site