Repository navigation
UCP/RMA: Sample multi-rail zcopy throughput #12002
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
136cb21
94249a3
1fee062
bcf1ac7
bd52808
7a755c6
39221b5
92f46e6
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 |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| #endif | ||
|
|
||
| #include "rma.inl" | ||
| #include "rma_bw.inl" | ||
|
|
||
| #include <ucp/core/ucp_request.inl> | ||
| #include <ucp/dt/datatype_iter.inl> | ||
|
|
@@ -157,16 +158,18 @@ ucp_proto_t ucp_get_offload_bcopy_proto = { | |
| }; | ||
|
|
||
| static UCS_F_ALWAYS_INLINE ucs_status_t | ||
| ucp_proto_get_offload_zcopy_send_func(ucp_request_t *req, | ||
| const ucp_proto_multi_lane_priv_t *lpriv, | ||
| ucp_datatype_iter_t *next_iter, | ||
| ucp_lane_index_t *lane_shift) | ||
| ucp_proto_get_offload_zcopy_send_common( | ||
| ucp_request_t *req, const ucp_proto_multi_lane_priv_t *lpriv, | ||
| ucp_datatype_iter_t *next_iter, int measure) | ||
| { | ||
| uct_rkey_t tl_rkey = ucp_rkey_get_tl_rkey(req->send.rma.rkey, | ||
|
gleon99 marked this conversation as resolved.
Resolved
|
||
| lpriv->super.rkey_index); | ||
| size_t offset = req->send.state.dt_iter.offset; | ||
| size_t offset = req->send.state.dt_iter.offset; | ||
| uct_completion_t *comp = &req->send.state.uct_comp; | ||
| const ucp_proto_multi_priv_t *mpriv; | ||
| ucp_rma_bw_frag_t *frag; | ||
| uct_iov_t iov; | ||
| ucs_status_t status; | ||
|
|
||
| ucp_datatype_iter_next_iov(&req->send.state.dt_iter, | ||
| ucp_proto_multi_max_payload(req, lpriv, 0), | ||
|
|
@@ -176,18 +179,60 @@ ucp_proto_get_offload_zcopy_send_func(ucp_request_t *req, | |
| mpriv = req->send.proto_config->priv; | ||
| ucp_proto_common_zcopy_adjust_min_frag(req, mpriv->min_frag, iov.length, | ||
| &iov, 1, &offset); | ||
| return uct_ep_get_zcopy(ucp_ep_get_lane(req->send.ep, lpriv->super.lane), | ||
| &iov, 1, req->send.rma.remote_addr + offset, | ||
| tl_rkey, &req->send.state.uct_comp); | ||
| if (measure) { | ||
| comp = ucp_rma_bw_frag_start(req, req->send.multi_lane_idx, &frag); | ||
| } | ||
|
|
||
| status = uct_ep_get_zcopy(ucp_ep_get_lane(req->send.ep, lpriv->super.lane), | ||
| &iov, 1, req->send.rma.remote_addr + offset, | ||
| tl_rkey, comp); | ||
| if (measure) { | ||
| ucp_rma_bw_frag_posted(frag, iov.length, status); | ||
| } | ||
|
Comment on lines
+182
to
+191
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. why do we need 2 timestamps? should not doorbell of zcopy be constant?
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. The return-time clock now runs only for sync |
||
|
|
||
| return status; | ||
| } | ||
|
|
||
| static UCS_F_ALWAYS_INLINE ucs_status_t | ||
| ucp_proto_get_offload_zcopy_send_func(ucp_request_t *req, | ||
| const ucp_proto_multi_lane_priv_t *lpriv, | ||
| ucp_datatype_iter_t *next_iter, | ||
| ucp_lane_index_t *lane_shift) | ||
| { | ||
| return ucp_proto_get_offload_zcopy_send_common(req, lpriv, next_iter, 0); | ||
| } | ||
|
|
||
| static UCS_F_ALWAYS_INLINE ucs_status_t | ||
| ucp_proto_get_offload_zcopy_sampled_send_func( | ||
| ucp_request_t *req, const ucp_proto_multi_lane_priv_t *lpriv, | ||
| ucp_datatype_iter_t *next_iter, ucp_lane_index_t *lane_shift) | ||
| { | ||
| return ucp_proto_get_offload_zcopy_send_common(req, lpriv, next_iter, 1); | ||
| } | ||
|
|
||
| static ucs_status_t ucp_proto_get_offload_zcopy_progress(uct_pending_req_t *self) | ||
| { | ||
| ucp_request_t *req = ucs_container_of(self, ucp_request_t, send.uct); | ||
| /* coverity[tainted_data_downcast] */ | ||
| const ucp_proto_multi_priv_t *mpriv = req->send.proto_config->priv; | ||
|
|
||
| if (!(req->flags & UCP_REQUEST_FLAG_PROTO_INITIALIZED)) { | ||
| ucp_rma_bw_sample_try_start(req, mpriv->num_lanes); | ||
| } | ||
|
|
||
| if (ucs_unlikely(req->flags & UCP_REQUEST_FLAG_RMA_BW_SAMPLE)) { | ||
| /* coverity[tainted_data_downcast] */ | ||
| return ucp_proto_multi_zcopy_progress( | ||
| req, mpriv, ucp_proto_multi_rma_init_func, | ||
| UCT_MD_MEM_ACCESS_LOCAL_WRITE, UCP_DT_MASK_CONTIG_IOV, | ||
| ucp_proto_get_offload_zcopy_sampled_send_func, | ||
| ucp_request_invoke_uct_completion_success, | ||
| ucp_rma_bw_sample_complete); | ||
| } | ||
|
|
||
| /* coverity[tainted_data_downcast] */ | ||
| return ucp_proto_multi_zcopy_progress( | ||
| req, req->send.proto_config->priv, ucp_proto_multi_rma_init_func, | ||
| req, mpriv, ucp_proto_multi_rma_init_func, | ||
| UCT_MD_MEM_ACCESS_LOCAL_WRITE, UCP_DT_MASK_CONTIG_IOV, | ||
| ucp_proto_get_offload_zcopy_send_func, | ||
| ucp_request_invoke_uct_completion_success, | ||
|
|
@@ -245,6 +290,7 @@ ucp_proto_get_offload_zcopy_probe(const ucp_proto_init_params_t *init_params) | |
|
|
||
| static ucs_status_t ucp_proto_get_offload_zcopy_reset(ucp_request_t *req) | ||
| { | ||
| ucp_rma_bw_sample_detach(req); | ||
| ucp_proto_get_offload_reset(req); | ||
| return ucp_proto_offload_zcopy_reset(req); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.