Lines Matching +full:1 +full:- +full:to +full:- +full:1
1 .. SPDX-License-Identifier: GPL-2.0
8 representation in the kernel. Update/change when doing changes to the
11 The architecture-agnostic topology definitions are in
12 Documentation/admin-guide/cputopology.rst. This file holds x86-specific
13 differences/specialities which must not necessarily apply to the generic
14 definitions. Thus, the way to read up on Linux topology on x86 is to start
17 Needless to say, code should use the generic functions - this file is *only*
18 here to *document* the inner workings of x86 topology.
22 The main aim of the topology facilities is to present adequate interfaces to
23 code which needs to know/query/use the structure of the running system wrt
27 socket has no relevance to software. It's an electromechanical component. In
30 there might be still references to sockets in the code, but they are of
35 - packages
36 - cores
37 - threads
48 Package-related topology information in the kernel:
50 - topology_num_threads_per_package()
54 - topology_num_cores_per_package()
58 - topology_max_dies_per_package()
62 - cpuinfo_x86.topo.die_id:
66 - cpuinfo_x86.topo.pkg_id:
74 - cpuinfo_x86.topo.logical_pkg_id:
76 The logical ID of the package. As we do not trust BIOSes to enumerate the
81 - topology_max_packages():
84 package facilities to preallocate per package information.
86 - cpuinfo_x86.topo.llc_id:
88 - On Intel, the first APIC ID of the list of CPUs sharing the Last Level
91 - On AMD, the Node ID or Core Complex ID containing the Last Level
97 A core consists of 1 or more threads. It does not matter whether the threads
98 are SMT- or CMT-type threads.
105 A thread is a single scheduling unit. It's the equivalent to a logical Linux
111 Thread-related topology information in the kernel:
113 - topology_core_cpumask():
115 The cpumask contains all online threads in the package to which a thread
120 - topology_sibling_cpumask():
122 The cpumask contains all online threads in the core to which a thread
125 - topology_logical_package_id():
127 The logical package ID to which a thread belongs.
129 - topology_physical_package_id():
131 The physical package ID to which a thread belongs.
133 - topology_core_id();
135 The ID of the core to which a thread belongs. It is also printed in /proc/cpuinfo
145 threads. Many BIOSes enumerate all threads 0 first and then all threads 1.
150 1) Single Package, Single Core::
152 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
158 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
159 -> [core 1] -> [thread 0] -> Linux CPU 1
163 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
164 -> [thread 1] -> Linux CPU 1
165 -> [core 1] -> [thread 0] -> Linux CPU 2
166 -> [thread 1] -> Linux CPU 3
170 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
171 -> [thread 1] -> Linux CPU 2
172 -> [core 1] -> [thread 0] -> Linux CPU 1
173 -> [thread 1] -> Linux CPU 3
177 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
178 -> [Compute Unit Core 1] -> Linux CPU 1
179 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
180 -> [Compute Unit Core 1] -> Linux CPU 3
186 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
187 -> [core 1] -> [thread 0] -> Linux CPU 1
189 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
190 -> [core 1] -> [thread 0] -> Linux CPU 3
194 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
195 -> [thread 1] -> Linux CPU 1
196 -> [core 1] -> [thread 0] -> Linux CPU 2
197 -> [thread 1] -> Linux CPU 3
199 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 4
200 -> [thread 1] -> Linux CPU 5
201 -> [core 1] -> [thread 0] -> Linux CPU 6
202 -> [thread 1] -> Linux CPU 7
206 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
207 -> [thread 1] -> Linux CPU 4
208 -> [core 1] -> [thread 0] -> Linux CPU 1
209 -> [thread 1] -> Linux CPU 5
211 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
212 -> [thread 1] -> Linux CPU 6
213 -> [core 1] -> [thread 0] -> Linux CPU 3
214 -> [thread 1] -> Linux CPU 7
218 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
219 -> [Compute Unit Core 1] -> Linux CPU 1
220 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
221 -> [Compute Unit Core 1] -> Linux CPU 3
223 [node 1] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 4
224 -> [Compute Unit Core 1] -> Linux CPU 5
225 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 6
226 -> [Compute Unit Core 1] -> Linux CPU 7