UCP/PROTO: Add option to force ZCOPY#11289
Open
tvegas1 wants to merge 4 commits intoopenucx:masterfrom
Open
Conversation
brminich
reviewed
Apr 1, 2026
src/ucp/proto/proto_reconfig.c
Outdated
| ucs_memory_type_t local_mem_type, remote_mem_type; | ||
|
|
||
| if (!ep->worker->context->config.ext.rma_force_zcopy || | ||
| (req->send.rma.rkey == NULL)) { |
Contributor
Author
There was a problem hiding this comment.
actually, it's no needed as rma should always have rkey
|
|
||
| /* This protocol should not be selected for valid and connected endpoint */ | ||
| if (ep->flags & UCP_EP_FLAG_REMOTE_CONNECTED) { | ||
| if (ucp_proto_reconfig_report_rma_force_zcopy_no_proto(req, ep)) { |
Contributor
There was a problem hiding this comment.
should we also abort request?
Contributor
Author
There was a problem hiding this comment.
it is aborted with canceled status inside this function, you prefer to take the abort call out of this function?
tvegas1
commented
Apr 1, 2026
tvegas1
commented
Apr 2, 2026
| test_ucp_rma_force_zcopy() | ||
| { | ||
| modify_config("RMA_FORCE_ZCOPY", "y"); | ||
| modify_config("IB_TX_INLINE_RESP", "0", SETENV_IF_NOT_EXIST); |
Contributor
Author
There was a problem hiding this comment.
@brminich, with that configuration, cap.get.min_zcopy=1, and proto selection multi rail makes the smallest size proportionate to the number of rails, so 2 with this IB device (max rail is set to 2 in this test), so for sizes < number of rails, we would need emulation currently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Add
UCX_RMA_FORCE_ZCOPY=y, only allow zero-copy RMA protocols when set, and print explicit error message in case missing such capability.Why?
Users need to be able to quickly identify when they are not using the optimal zero-copy path.
How?
Disable emulated protocols and print error message on connected protocol reconfig selection.