Repository navigation
UCP/WIREUP: Allow EP check during WIREUP phase - #6069
Conversation
|
|
||
| if (wireup_ep->flags & UCP_WIREUP_EP_FLAG_LOCAL_CONNECTED) { | ||
| return uct_ep_check(wireup_ep->super.uct_ep, flags, comp); | ||
| } else if ((wireup_ep->aux_ep != NULL) && |
There was a problem hiding this comment.
can remove 'else'
BTW, why need to check UCT_IFACE_FLAG_EP_CHECK flag? i would expect UCP keepalive mechanism to check this already
There was a problem hiding this comment.
removed
The check EP_CHECK flag is needed, since UCP KA mechanism checks it only for iface which wireup_ep->super.uct_ep belongs to (e.g. next_ep - RC, aux_ep - UD. but UD doesn't have EP_CHECK support)
There was a problem hiding this comment.
so we need to make sure only transports which have CHECK support are used as aux_ep
There was a problem hiding this comment.
then UD couldn't be used as aux_ep
There was a problem hiding this comment.
ok, is it a problem?
BTW need to make sure UCP would really send keepalive on the ep used for wireup messages, and that ep keepalive list is updated when ep configuration changes
There was a problem hiding this comment.
done, now doing EP check over UCT if connected, and otherwise - over AUX EP
|
/azp run |
|
bot:pipe:retest |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@hoopoepg could you review pls? |
|
re-run tests against the current master, since #6059 was merged |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
bot:pipe:retest |
fca6775 to
7f21d44
Compare
|
|
||
| void ucp_ep_destroy_internal(ucp_ep_h ep) | ||
| { | ||
| if (--ep->ref_cnt != 0) { |
There was a problem hiding this comment.
This way we leave ucp_ep visible to keepalive_progress but not checkable (ep_check returns timeout). Hence warnings in ucp_ep_do_keepalive().
There was a problem hiding this comment.
This way we leave ucp_ep visible to keepalive_progress but not checkable (ep_check returns timeout). Hence warnings in ucp_ep_do_keepalive().
@Artemy-Mellanox good catch, thank you!
moved this check to ucp_ep_destroy_base() where UCP EP is about to be removed
|
@yosefe @Artemy-Mellanox could you review pls? |
| !(/* if error handling and keepalive were requested, UCT iface has to | ||
| * support peer failure (i.e. UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE) | ||
| * and either built-in Keep Alive (i.e. UCT_IFACE_FLAG_EP_KEEPALIVE) | ||
| * or EP checking (i.e. UCT_IFACE_FLAG_EP_CHECK) */ | ||
| !ucp_worker_keepalive_is_enabled(worker) || | ||
| !(select_params->ep_init_flags & UCP_EP_INIT_ERR_MODE_PEER_FAILURE) || | ||
| ucp_wireup_check_flags(resource, iface_attr->cap.flags, | ||
| UCT_IFACE_FLAG_EP_KEEPALIVE, criteria->title, | ||
| ucp_wireup_iface_flags, p, endp - p) || | ||
| ucp_wireup_check_flags(resource, iface_attr->cap.flags, | ||
| UCT_IFACE_FLAG_EP_CHECK, criteria->title, | ||
| ucp_wireup_iface_flags, p, endp - p)) || |
There was a problem hiding this comment.
added the helper function
| return uct_ep_check(wireup_ep->aux_ep, flags, comp); | ||
| } | ||
|
|
||
| ucs_assert(ucp_worker_iface(worker, |
| return /* if error handling and keepalive were requested, UCT iface has to | ||
| * support peer failure (i.e. UCT_IFACE_FLAG_ERRHANDLE_PEER_FAILURE) | ||
| * and either built-in keepalive (i.e. UCT_IFACE_FLAG_EP_KEEPALIVE) | ||
| * or EP checking (i.e. UCT_IFACE_FLAG_EP_CHECK) */ | ||
| !ucp_worker_keepalive_is_enabled(worker) || | ||
| !(select_params->ep_init_flags & UCP_EP_INIT_ERR_MODE_PEER_FAILURE) || | ||
| ucp_wireup_check_flags(resource, flags, UCT_IFACE_FLAG_EP_KEEPALIVE, title, | ||
| ucp_wireup_iface_flags, reason, max) || | ||
| ucp_wireup_check_flags(resource, flags, UCT_IFACE_FLAG_EP_CHECK, title, | ||
| ucp_wireup_iface_flags, reason, max); |
There was a problem hiding this comment.
does it mean that every transport we select must support keepalive or ep_check?
it means that before this PR, we could have a case where the user requested err handling mode, but keepalive may not be working because selected transport did not support?
There was a problem hiding this comment.
does it mean that every transport we select must support keepalive or ep_check?
if KA is enabled (now it is by default) and error handling requested, every selected transport has to support built-in KA or ep_check
it means that before this PR, we could have a case where the user requested err handling mode, but keepalive may not be working because selected transport did not support?
yes, this was a case, e.g. for UD before EP_CHECK was introduced
b9e33b9 to
389768e
Compare
|
@yosefe ok to merge? |
What
Allow EP check during WIREUP phase, i.e. UCP will do KA during WIREUP pahse.
Why ?
The remote peer could be failed or forcibly closed during WIREUP MSG phase, e.g. as in #6011 issue:
rdma_establish()and UCT informs client about connect completion. CM phase is considered as completed on a client side. Server will start WIREUP MSG phase after from CM'sconn_notify_cbcallbackFixes #6011.
Enabling KA by default (#6059) will fix the issue fully.
How ?
Do WIREUP EP check if UCT EP is locally connected or auxiliary UCT EP is not a
NULLand supportsUCT_IFACE_FLAG_EP_CHECK; otherwise - returnUCS_OK.