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 authored Nov 29, 2023
1 parent 7e45ca1 commit 90353e5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ucp/wireup/select.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,12 +1469,16 @@ 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 {
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 90353e5

Please sign in to comment.