Skip to content

Commit 1655e16

Browse files
authored
Merge pull request #9760 from ivankochin/ucp/wireup/consider-local-distance-duing-slow-lanes-dropping-1.16.x
UCP/WIREUP: Consider local distance during slow lanes dropping - v1.16.x
2 parents c627590 + c8fb76b commit 1655e16

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/ucp/wireup/select.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,12 +1461,18 @@ static double ucp_wireup_get_lane_bw(ucp_worker_h worker,
14611461
const ucp_wireup_select_info_t *sinfo,
14621462
const ucp_unpacked_address_t *address)
14631463
{
1464-
ucp_context_h context = worker->context;
1465-
const uct_iface_attr_t *iface_attr;
1464+
ucp_worker_iface_t *wiface = ucp_worker_iface(worker, sinfo->rsc_index);
14661465
double bw_local, bw_remote;
14671466

1468-
iface_attr = ucp_worker_iface_get_attr(worker, sinfo->rsc_index);
1469-
bw_local = ucp_tl_iface_bandwidth(context, &iface_attr->bandwidth);
1467+
if (address->dst_version < 17) {
1468+
bw_local = ucp_tl_iface_bandwidth(worker->context,
1469+
&wiface->attr.bandwidth);
1470+
} else {
1471+
/* Compare BW including local distance to prevent EP reconfiguration
1472+
* since remote distance is included to remote_addr*/
1473+
bw_local = ucp_wireup_iface_bw_distance(wiface);
1474+
}
1475+
14701476
bw_remote = address->address_list[sinfo->addr_index].iface_attr.bandwidth;
14711477

14721478
if (address->addr_version == UCP_OBJECT_VERSION_V2) {

0 commit comments

Comments
 (0)