Skip to content

Commit

Permalink
UCP/WIREUP: Consider local distance during slow lanes dropping
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankochin committed Nov 30, 2023
1 parent 7e45ca1 commit 350d795
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/ucp/wireup/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,12 +1469,18 @@ static double ucp_wireup_get_lane_bw(ucp_worker_h worker,
const ucp_wireup_select_info_t *sinfo,
const ucp_unpacked_address_t *address)
{
ucp_context_h context = worker->context;
const uct_iface_attr_t *iface_attr;
ucp_worker_iface_t *wiface = ucp_worker_iface(worker, sinfo->rsc_index);
double bw_local, bw_remote;

iface_attr = ucp_worker_iface_get_attr(worker, sinfo->rsc_index);
bw_local = ucp_tl_iface_bandwidth(context, &iface_attr->bandwidth);
if (address->dst_version < 17) {
bw_local = ucp_tl_iface_bandwidth(worker->context,
&wiface->attr.bandwidth);
} else {
/* Compare BW including local distance to prevent EP reconfiguration
* since remote distance is included to remote_addr*/
bw_local = ucp_wireup_iface_bw_distance(wiface);
}

bw_remote = address->address_list[sinfo->addr_index].iface_attr.bandwidth;

if (address->addr_version == UCP_OBJECT_VERSION_V2) {
Expand Down

0 comments on commit 350d795

Please sign in to comment.