Repository navigation
UCP/WIREUP: consider NUMA locality for cpuset during device scoring - #11459
Conversation
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
william-gallagher-nv
left a comment
There was a problem hiding this comment.
I talked through changes with @roiedanino. One small suggestion.
|
🚫 @roiedanino — not authorized to trigger a review on this repo. Contact a repo admin to be added to the allowed-users list. |
Signed-off-by: Roie Danino <rdanino@nvidia.com>
…ments Signed-off-by: Roie Danino <rdanino@nvidia.com>
|
🚫 @roiedanino — not authorized to trigger a review on this repo. Contact a repo admin to be added to the allowed-users list. |
|
@roiedanino i which cases the score function is exactly the same? |
|
@yosefe, when we have 2 devices or more of the same generation |
…the scoring function instead of tie-breaking Signed-off-by: Roie Danino <rdanino@nvidia.com>
|
@roiedanino plz fix PR description ( |
| ucs_trace(UCT_TL_RESOURCE_DESC_FMT | ||
| "->addr[%u] : %s score %.2f priority %d", | ||
| UCT_TL_RESOURCE_DESC_ARG(resource), | ||
| addr_index, criteria->title, score, priority); |
| ucs_topo_get_memory_distance(sys_dev, distance); | ||
| } else { | ||
| ucs_topo_get_memory_distance_for_cpuset( | ||
| sys_dev, &wiface->worker->cpu_mask, distance); |
There was a problem hiding this comment.
in which case we get cpu_mask from user application?
There was a problem hiding this comment.
Good point, I'm reverting this PR:
This fix has 0 effect, the actual issue comes from HPCX packaging:
UCX_MODULE_DIR is not exported properly, causing a massive degradation
What?
Use the UCP worker CPU mask when calculating topology memory distance for host-memory-capable devices.
Why?
When several equivalent network devices are available, UCX scoring may otherwise use a memory-distance value based on the current thread affinity instead of the worker locality. This can lead wireup to select a less NUMA-local device for the worker, especially on multi-NIC / multi-NUMA systems.
How?
Add
ucs_topo_get_memory_distance_for_cpuset()and implement it in the sysfs topology provider. When a worker has a non-empty CPU mask,ucp_worker_iface_get_memory_distance()calculates device memory distance against that CPU set. If the worker CPU mask is empty, UCX keeps the previous behavior and falls back toucs_topo_get_memory_distance().The PR also extends the mock UCP proto tests with fake sys devices/NUMA nodes and verifies that worker CPU mask locality affects the selected RC device.