Lines Matching +full:non +full:- +full:core
1 .. SPDX-License-Identifier: GPL-2.0
11 The architecture-agnostic topology definitions are in
12 Documentation/admin-guide/cputopology.rst. This file holds x86-specific
17 Needless to say, code should use the generic functions - this file is *only*
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:
81 - topology_max_packages():
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.
100 AMDs nomenclature for a CMT core is "Compute Unit". The kernel always uses
101 "core".
108 AMDs nomenclature for CMT threads is "Compute Unit Core". The kernel always
111 Thread-related topology information in the kernel:
113 - topology_core_cpumask():
120 - topology_sibling_cpumask():
122 The cpumask contains all online threads in the core to which a thread
125 - topology_logical_package_id():
129 - topology_physical_package_id():
133 - topology_core_id();
135 The ID of the core to which a thread belongs. It is also printed in /proc/cpuinfo
138 - topology_logical_core_id();
140 The logical core ID to which a thread belongs.
156 1) CPUID leaf 0x80000026 [Extended CPU Topology] (Core::X86::Cpuid::ExCpuTopology)
159 and provides the topology information of Core, Complex, CCD (Die), and
164 in `EBX[15:0]` at a particular level (starting from 0) is non-zero.
167 the level describes - Core, Complex, CCD(Die), or the Socket.
170 number of bits that need to be right-shifted from `ExtendedLocalApicId`
175 and efficiency rankings, and about the core type on AMD processors with
180 2) CPUID leaf 0x0000000B [Extended Topology Enumeration] (Core::X86::Cpuid::ExtTopEnum)
183 CPUID leaf 0x80000026 and only describes the core, and the socket domains
188 (starting from 0) is non-zero.
191 that the level describes - Thread, or Processor (Socket).
194 number of bits that need to be right-shifted from the `ExtendedLocalApicId`
201 3) CPUID leaf 0x80000008 ECX [Size Identifiers] (Core::X86::Cpuid::SizeId)
211 `ApicIdSize` field in `ECX[15:12]` if it is non-zero.
215 `ECX[7:0]` which describes the `number of threads - 1` on the package.
225 4) CPUID leaf 0x8000001E [Extended APIC ID, Core Identifiers, Node Identifiers]
226 (Core::X86::Cpuid::{ExtApicId,CoreId,NodeId})
230 [Feature Identifiers] (Core::X86::Cpuid::FeatureExtIdEcx).
238 0x80000026 or CPUID leaf 0xB, the shifts from the APIC ID for the Core
239 ID is calculated using the order of `number of threads per core`
241 describes `number of threads per core - 1`.
243 On Processors of Family 0x15, the Core ID from `EBX[7:0]` is used as the
249 (Core::X86::Cpuid::NodeId) as the per-CPU `node_id`. On older processors,
253 (Core::X86::Cpuid::FeatureExtIdEcx).
264 the topology information of Core, Module, Tile, Die, DieGrp, and Socket
269 (starting from 0) is non-zero.
271 The `Domain Type` in `ECX[15:8]` of the sub-leaf provides the topology
272 domain that the level describes - Core, Module, Tile, Die, DieGrp, and
286 Topology Enumeration Leaf 0x1F and only describes the core, and the
291 (starting from 0) is non-zero.
305 Processors that feature Hyper-Threading is detected using `EDX[28]` of
309 sharing this cache` from `EAX[25:14]` of level-0 of CPUID 0x4 provides
310 the shifts from the APIC ID required to compute the Core ID.
345 1) Single Package, Single Core::
347 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
349 2) Single Package, Dual Core
351 a) One thread per core::
353 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
354 -> [core 1] -> [thread 0] -> Linux CPU 1
356 b) Two threads per core::
358 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
359 -> [thread 1] -> Linux CPU 1
360 -> [core 1] -> [thread 0] -> Linux CPU 2
361 -> [thread 1] -> Linux CPU 3
365 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
366 -> [thread 1] -> Linux CPU 2
367 -> [core 1] -> [thread 0] -> Linux CPU 1
368 -> [thread 1] -> Linux CPU 3
372 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
373 -> [Compute Unit Core 1] -> Linux CPU 1
374 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
375 -> [Compute Unit Core 1] -> Linux CPU 3
377 4) Dual Package, Dual Core
379 a) One thread per core::
381 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
382 -> [core 1] -> [thread 0] -> Linux CPU 1
384 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
385 -> [core 1] -> [thread 0] -> Linux CPU 3
387 b) Two threads per core::
389 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
390 -> [thread 1] -> Linux CPU 1
391 -> [core 1] -> [thread 0] -> Linux CPU 2
392 -> [thread 1] -> Linux CPU 3
394 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 4
395 -> [thread 1] -> Linux CPU 5
396 -> [core 1] -> [thread 0] -> Linux CPU 6
397 -> [thread 1] -> Linux CPU 7
401 [package 0] -> [core 0] -> [thread 0] -> Linux CPU 0
402 -> [thread 1] -> Linux CPU 4
403 -> [core 1] -> [thread 0] -> Linux CPU 1
404 -> [thread 1] -> Linux CPU 5
406 [package 1] -> [core 0] -> [thread 0] -> Linux CPU 2
407 -> [thread 1] -> Linux CPU 6
408 -> [core 1] -> [thread 0] -> Linux CPU 3
409 -> [thread 1] -> Linux CPU 7
413 [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
414 -> [Compute Unit Core 1] -> Linux CPU 1
415 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
416 -> [Compute Unit Core 1] -> Linux CPU 3
418 [node 1] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 4
419 -> [Compute Unit Core 1] -> Linux CPU 5
420 -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 6
421 -> [Compute Unit Core 1] -> Linux CPU 7