-
Notifications
You must be signed in to change notification settings - Fork 525
UCP/PROTO: RMA and AMO restart #8547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,6 +219,15 @@ UCS_PROFILE_FUNC(ucs_status_ptr_t, ucp_atomic_op_nbx, | |
| ep, &ucp_rkey_config(ep->worker, rkey)->proto_select, | ||
| rkey->cfg_index, req, op_id, buffer, 1, param->datatype, | ||
| op_size, param, 0, 0); | ||
| if (ucs_likely(req->flags & UCP_REQUEST_FLAG_PROTO_AMO_PACKED)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to set AMO_PACKED flag only for t protocols, to avoid the branch on "op_id == UCP_OP_ID_AMO_POST" in line 264?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It depends on if
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe introduce another flag , UCP_REQUEST_FLAG_PROTO_AMO_COMPLETED?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO it's confusing since buffered (packed) value actually does not complete operation. Also such flag will have different behavior for different ops.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
| #if ENABLE_ASSERT | ||
| req->send.state.dt_iter.type.contig.buffer = NULL; | ||
| #endif | ||
| } else { | ||
| /* We cannot return UCS_OK if value was not packed, need to block | ||
| * freeing or reusage of buffer */ | ||
| goto out; | ||
| } | ||
| } else { | ||
| status = UCP_RKEY_RESOLVE(rkey, ep, amo); | ||
| if (status != UCS_OK) { | ||
|
|
@@ -272,16 +281,11 @@ ucs_status_t ucp_atomic_post(ucp_ep_h ep, ucp_atomic_post_op_t opcode, uint64_t | |
| .op_attr_mask = UCP_OP_ATTR_FIELD_DATATYPE, | ||
| .datatype = ucp_dt_make_contig(op_size) | ||
| }; | ||
| ucs_status_ptr_t status_p; | ||
| void *request; | ||
|
|
||
| status_p = ucp_atomic_op_nbx(ep, ucp_post_atomic_op_table[opcode], &value, | ||
| request = ucp_atomic_op_nbx(ep, ucp_post_atomic_op_table[opcode], &value, | ||
| 1, remote_addr, rkey, ¶m); | ||
| if (UCS_PTR_IS_PTR(status_p)) { | ||
| ucp_request_release(status_p); | ||
| return UCS_OK; | ||
| } | ||
|
|
||
| return UCS_PTR_STATUS(status_p); | ||
| return ucp_rma_wait(ep->worker, request, "post"); | ||
| } | ||
|
|
||
| static inline ucs_status_t | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also need to update ucp_atomic_op_nbx so it will return UCS_OK only if UCP_REQUEST_FLAG_PROTO_AMO_PACKED flag is set, and then also (for debug build) set buffer to NULL to make sure it's not used anymore