Re: [patch 00/53] x86/topology: The final installment

From: Qiuxu Zhuo
Date: Wed Aug 09 2023 - 12:18:01 EST


Hi Thomas,

> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> ...
> Subject: [patch 00/53] x86/topology: The final installment
> ...
>
> The current series applies on top of
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git topo-cpuid-v3
>
> and is available from git here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git topo-full-v1

Test Machine
------------
I tested the 'topo-full-v1' branch on a Sapphire Rapids server with 2 sockets,
each containing 48 cores, resulting in a total of 192 threads.


Test Results
------------
The following test results (same result either w/ or w/o [1]) show that
this branch worked well on this server. Based on the test results,

Tested-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>

[1] https://lore.kernel.org/all/20230808221039.GH212435@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/


Logs (hyper-thread enabled)
---------------------------
1.1 dmesg | grep "CPU topo" :

CPU topo: Max. logical packages: 2
CPU topo: Max. logical dies: 2
CPU topo: Max. dies per package: 1
CPU topo: Max. threads per core: 2
CPU topo: Num. cores per package: 48
CPU topo: Num. threads per package: 96
CPU topo: Allowing 192 present CPUs plus 0 hotplug CPUs
CPU topo: Thread : 192
CPU topo: Core : 96
CPU topo: Module : 2
CPU topo: Tile : 2
CPU topo: Die : 2
CPU topo: Package : 2

1.2 cat /sys/kernel/debug/x86/topo/domains :

domain: Thread shift: 1 dom_size: 2 max_threads: 2
domain: Core shift: 7 dom_size: 64 max_threads: 128
domain: Module shift: 7 dom_size: 1 max_threads: 128
domain: Tile shift: 7 dom_size: 1 max_threads: 128
domain: Die shift: 7 dom_size: 1 max_threads: 128
domain: Package shift: 7 dom_size: 1 max_threads: 128

1.3 <1st socket, 1st core, primary thread>
cat /sys/kernel/debug/x86/topo/cpus/0
online: 1
initial_apicid: 0
apicid: 0
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 0
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 0
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<1st socket, last core, primary thread>
cat /sys/kernel/debug/x86/topo/cpus/47
online: 1
initial_apicid: 5e
apicid: 5e
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 47
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 94
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<2nd socket, 1st core, primary thread>
cat /sys/kernel/debug/x86/topo/cpus/48
online: 1
initial_apicid: 80
apicid: 80
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 0
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 128
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<2nd socket, last core, primary thread>
cat /sys/kernel/debug/x86/topo/cpus/95
online: 1
initial_apicid: de
apicid: de
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 47
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 222
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<1st socket, 1st core, secondary thread>
cat /sys/kernel/debug/x86/topo/cpus/96
online: 1
initial_apicid: 1
apicid: 1
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 0
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 0
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<1st socket, last core, secondary thread>
cat /sys/kernel/debug/x86/topo/cpus/143
online: 1
initial_apicid: 5f
apicid: 5f
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 47
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 94
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<2nd socket, 1st core, secondary thread>
cat /sys/kernel/debug/x86/topo/cpus/144
online: 1
initial_apicid: 81
apicid: 81
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 0
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 128
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

<2nd socket, last core, secondary thread>
cat /sys/kernel/debug/x86/topo/cpus/191
online: 1
initial_apicid: df
apicid: df
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 47
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 222
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 96
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:2

Logs (hyper-thread disabled)
----------------------------
2.1 dmesg | grep "CPU topo" :

CPU topo: Max. logical packages: 2
CPU topo: Max. logical dies: 2
CPU topo: Max. dies per package: 1
CPU topo: Max. threads per core: 1
CPU topo: Num. cores per package: 48
CPU topo: Num. threads per package: 48
CPU topo: Allowing 96 present CPUs plus 0 hotplug CPUs
CPU topo: Thread : 96
CPU topo: Core : 96
CPU topo: Module : 2
CPU topo: Tile : 2
CPU topo: Die : 2
CPU topo: Package : 2

2.2 cat /sys/kernel/debug/x86/topo/domains :

domain: Thread shift: 1 dom_size: 2 max_threads: 2
domain: Core shift: 7 dom_size: 64 max_threads: 128
domain: Module shift: 7 dom_size: 1 max_threads: 128
domain: Tile shift: 7 dom_size: 1 max_threads: 128
domain: Die shift: 7 dom_size: 1 max_threads: 128
domain: Package shift: 7 dom_size: 1 max_threads: 128

2.3 <1st socket, 1st core>
cat /sys/kernel/debug/x86/topo/cpus/0
online: 1
initial_apicid: 0
apicid: 0
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 0
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 0
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 48
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:1

<1st socket, last core>
cat /sys/kernel/debug/x86/topo/cpus/47
online: 1
initial_apicid: 5e
apicid: 5e
pkg_id: 0
die_id: 0
cu_id: 255
core_id: 47
logical_pkg_id: 0
logical_die_id: 0
llc_id: 0
l2c_id: 94
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 48
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:1

<2nd socket, 1st core>
cat /sys/kernel/debug/x86/topo/cpus/48
online: 1
initial_apicid: 80
apicid: 80
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 0
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 128
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 48
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:1

<2nd socket, last core>
cat /sys/kernel/debug/x86/topo/cpus/95
online: 1
initial_apicid: de
apicid: de
pkg_id: 1
die_id: 1
cu_id: 255
core_id: 47
logical_pkg_id: 1
logical_die_id: 1
llc_id: 128
l2c_id: 222
amd_node_id: 0
amd_nodes_per_pkg: 0
num_threads: 48
num_cores: 48
max_dies_per_pkg: 1
max_threads_per_core:1

-Qiuxu