Skip to content

Commit 549b84f

Browse files
committed
API: clarify the default filtering of dies
The core keeps all dies by default. However our Linux backend applies its own KEEP_STRUCTURE because it has no way to know if the kernel exposes a real single die per package, or just a default non-existing one. x86 seems to behave properly: a recent SPR processor doesn't report a single die in CPUID topology enumeraton, hence the x86 backend doesn't have to filter any useless die out. Refs #622 Signed-off-by: Brice Goglin <[email protected]>
1 parent 6d5e036 commit 549b84f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

include/hwloc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ typedef enum {
338338

339339
HWLOC_OBJ_DIE, /**< \brief Die within a physical package.
340340
* A subpart of the physical package, that contains multiple cores.
341+
*
342+
* Some operating systems (e.g. Linux) may expose a single die per package
343+
* even if the hardware does not support dies at all. To avoid showing
344+
* such non-existing dies, the corresponding hwloc backend may filter them out.
345+
* This is functionally equivalent to ::HWLOC_TYPE_FILTER_KEEP_STRUCTURE
346+
* being enforced.
341347
*/
342348

343349
HWLOC_OBJ_TYPE_MAX /**< \private Sentinel value */
@@ -2521,7 +2527,7 @@ HWLOC_DECLSPEC const struct hwloc_topology_support *hwloc_topology_get_support(h
25212527
*
25222528
* By default, most objects are kept (::HWLOC_TYPE_FILTER_KEEP_ALL).
25232529
* Instruction caches, memory-side caches, I/O and Misc objects are ignored by default (::HWLOC_TYPE_FILTER_KEEP_NONE).
2524-
* Die and Group levels are ignored unless they bring structure (::HWLOC_TYPE_FILTER_KEEP_STRUCTURE).
2530+
* Group levels are ignored unless they bring structure (::HWLOC_TYPE_FILTER_KEEP_STRUCTURE).
25252531
*
25262532
* Note that group objects are also ignored individually (without the entire level)
25272533
* when they do not bring structure.

0 commit comments

Comments
 (0)