Commit 75234cb
committed
utils/calc: fix searching NUMA nodes inside CPU objects when NUMA are attached higher
This is the symmetric of the previous commit, but reversing NUMAs and PUs.
When a NUMA node is attached at a level, and we search for that NUMA node
inside children of that level (hierarchical spec), the cpuset of the NUMA
node contains more than just one children, hence we wouldn't find it
with isincluded(). We now use zero()||intersects() instead.
Example (different from the one added in test-hwloc-calc):
AMD machine with 4 L3 (4 cores each) and 1 NUMA per package (16 cores total).
"hwloc-calc l3:0.numa:0" should return the first NUMA (cpuset 0xffff nodeset 0x1)
but it didn't because it's not included in the L3 (cpuset 0x000f nodeset 0x1).
This should not happen when the user knows the ordering of levels in the machine,
but may happen when using generic scripts that don't know where NUMA is attached
(L3 above NUMA on some Intel/SNC but below on AMD currently).
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>1 parent f0eeb3a commit 75234cb
File tree
3 files changed
+8
-2
lines changed- utils/hwloc
3 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
0 commit comments