Skip to content

Commit 5d7962a

Browse files
committed
UCP/WIREUP: Don't request invalidate without RNDV
1 parent 3842a65 commit 5d7962a

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/ucp/core/ucp_context.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,13 @@ ucp_context_usage_tracker_enabled(ucp_context_h context)
732732
return context->config.ext.dynamic_tl_switch_interval != UCS_TIME_INFINITY;
733733
}
734734

735+
static UCS_F_ALWAYS_INLINE int
736+
ucp_context_rndv_is_enabled(ucp_context_h context)
737+
{
738+
return (context->config.ext.rndv_intra_thresh != UCS_MEMUNITS_INF) ||
739+
(context->config.ext.rndv_inter_thresh != UCS_MEMUNITS_INF);
740+
}
741+
735742
void ucp_context_memaccess_tl_bitmap(ucp_context_h context,
736743
ucs_memory_type_t mem_type,
737744
uint64_t md_reg_flags,

src/ucp/core/ucp_worker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "ucp_rkey.h"
1616
#include "ucp_request.inl"
1717

18+
#include <ucp/core/ucp_context.h>
1819
#include <ucp/proto/proto_common.inl>
1920
#include <ucp/wireup/address.h>
2021
#include <ucp/wireup/wireup_cm.h>
@@ -337,8 +338,7 @@ static ucs_status_t ucp_worker_wakeup_init(ucp_worker_h worker,
337338
*/
338339
if ((events & UCP_WAKEUP_TAG_SEND) ||
339340
((events & UCP_WAKEUP_TAG_RECV) &&
340-
((context->config.ext.rndv_intra_thresh != UCS_MEMUNITS_INF) ||
341-
(context->config.ext.rndv_inter_thresh != UCS_MEMUNITS_INF))))
341+
ucp_context_rndv_is_enabled(context)))
342342
{
343343
worker->uct_events |= UCT_EVENT_SEND_COMP;
344344
}

src/ucp/wireup/select.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,9 +2125,11 @@ ucp_wireup_add_rma_bw_lanes(const ucp_wireup_select_params_t *select_params,
21252125
bw_info.max_lanes = context->config.ext.max_rndv_lanes;
21262126
}
21272127

2128-
/* If error handling is requested we require memory invalidation
2129-
* support to provide correct data integrity in case of error */
2130-
if (ep_init_flags & UCP_EP_INIT_ERR_MODE_PEER_FAILURE) {
2128+
/* If error handling is requested and we have RNDV, we require memory
2129+
* invalidation support to provide correct data integrity in case of error.
2130+
*/
2131+
if ((ep_init_flags & UCP_EP_INIT_ERR_MODE_PEER_FAILURE) &&
2132+
ucp_context_rndv_is_enabled(context)) {
21312133
bw_info.criteria.local_md_flags |= UCT_MD_FLAG_INVALIDATE_RMA;
21322134
}
21332135

0 commit comments

Comments
 (0)