hwloc: hpux: improve hwloc_hpux_find_ldom() looking for NUMA node
hwloc_get_first_largest_obj_inside_cpuset() returns the largest/highest object, but it could still have a child with the same cpuset. So check children as well in case there's a matching NUMA node there. (cherry picked from commit open-mpi/hwloc@57a1c4fbe4) Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
fff1bb5dcd
Коммит
6caf9edbea
@ -43,9 +43,17 @@ hwloc_hpux_find_ldom(hwloc_topology_t topology, hwloc_const_bitmap_t hwloc_set)
|
||||
return -1;
|
||||
|
||||
obj = hwloc_get_first_largest_obj_inside_cpuset(topology, hwloc_set);
|
||||
if (!hwloc_bitmap_isequal(obj->cpuset, hwloc_set) || obj->type != HWLOC_OBJ_NODE) {
|
||||
if (!hwloc_bitmap_isequal(obj->cpuset, hwloc_set))
|
||||
/* Does not correspond to exactly one node */
|
||||
return -1;
|
||||
/* obj is the highest possibly matching object, but some (single) child (with same cpuset) could match too */
|
||||
while (obj->type != HWLOC_OBJ_NODE) {
|
||||
/* try the first child, in case it has the same cpuset */
|
||||
if (!obj->first_child
|
||||
|| !obj->first_child->cpuset
|
||||
|| !hwloc_bitmap_isequal(obj->cpuset, obj->first_child->cpuset))
|
||||
return -1;
|
||||
obj = obj->first_child;
|
||||
}
|
||||
|
||||
return obj->os_index;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user