UCP/RMA: Preserve fence ordering for rendezvous operations - #11927
UCP/RMA: Preserve fence ordering for rendezvous operations#11927nbellalou wants to merge 5 commits into
Conversation
Allow internal callers to flush a selected set of endpoint lanes while preserving the existing all-lane flush behavior. Track lane replacement generations so an in-flight flush safely reconciles failover topology changes. Overlay the new lane-selection snapshot with the later memory-flush phase, keeping ucp_request_t at its existing release size. Signed-off-by: Nathan Bellalou <nbellalou@nvidia.com>
Add an epoch-ordered per-endpoint queue and progress callback that can advance a fence with a selective remote flush before retrying blocked work. Track the in-flight flush explicitly and purge queued requests on terminal errors. Overlay the new fence metadata with the existing RMA and atomic request storage through an anonymous union. This preserves the established send.rma and send.amo field names and limits the request size increase to eight bytes. Signed-off-by: Nathan Bellalou <nbellalou@nvidia.com>
Track lane replacements that affect pre-fence work and conservatively normalize the fence lane mask before flushing. Keep queued fence requests across endpoint reconfiguration and restart protocol requests on the current endpoint configuration. Signed-off-by: Nathan Bellalou <nbellalou@nvidia.com>
Gate RMA and atomic request admission on the endpoint fence epoch without progressing UCT recursively. Queue blocked requests on the endpoint, make endpoint and worker flush wait for relevant fence work, and cover fresh requests that defer before selecting a transport lane. Signed-off-by: Nathan Bellalou <nbellalou@nvidia.com>
Track RMA rendezvous transfers until their nested remote operation completes, so endpoint-based fence ordering cannot bypass them. Make retry accounting transactional, tag rendezvous completions with a backward-compatible one-byte header flag, and gate the protocol on compatible peers and error modes. Signed-off-by: Nathan Bellalou <nbellalou@nvidia.com>
|
🤖 Starting review — findings will be posted here when done. |
| @@ -55,6 +55,7 @@ static const char *ucp_request_flag_names[] = { | |||
| [ucs_ilog2(UCP_REQUEST_FLAG_RNDV_GET_REQ)] = "rndv_get_req", | |||
There was a problem hiding this comment.
UCP_REQUEST_FLAG_FENCE_BLOCKED (bit 30) is added but has no entry in ucp_request_flag_names[], while UCP_REQUEST_FLAG_RMA_RNDV_TRACKED (bit 31) does. A blocked fenced request will render without that flag name in ucp_request_str() debug output. Add an entry, e.g. [ucs_ilog2(UCP_REQUEST_FLAG_FENCE_BLOCKED)] = "fence_blk".
| @@ -69,7 +79,9 @@ enum { | |||
| UCP_REQUEST_FLAG_RNDV_SEND_INTERNAL = UCS_BIT(26), | |||
There was a problem hiding this comment.
UCP_STATUS_FENCE_DEFER (UCS_ERR_LAST + 1) evaluates to -99, which UCS_STATUS_IS_ERR() reports as an error and which is not a named status; if it ever escapes the hand-written interception points (e.g. into ucs_status_string() or a generic error path) it will be misinterpreted. The interception is currently careful, but consider a comment noting it is an internal sentinel that must never reach generic status handling, and double-check the static-assert message ("must be an error pointer") — the wording is confusing since this is a status code, not a pointer.
|
PR scope blocker: The PR adds well over 500 lines of non-test source plus ~650 lines of tests in a single change. Per the project size limit, this is too large to review and land as one unit. Please split it into separately reviewable PRs — e.g. (1) the request-union restructuring (rma/amo sharing fence_seq/fence_pending_elem), (2) selective-lane flush + lane-generation tracking, (3) the async fence queue, and (4) RMA/RNDV visibility tracking. Each should be independently testable. Test coverage note: The RMA/RNDV visibility and fence-queue tests are gated on is_self(), so several of the new behaviors are only exercised on the self transport. Worth confirming CI runs an inter-node/failover job that also exercises the RMA/RNDV dst_version/err-mode gating and the reconfiguration-restart path in ucp_ep_fence_dispatch_request, since those are the highest-risk paths and are not covered by the synthetic self-only tests. |
|
🤖 CI Triage Agent — TL;DR: The "roce on worker 1" job didn't fail on any test or compile error — the Azure DevOps agent ( Full analysisSummary: Job Root cause: Infrastructure/agent termination, not a code defect. The log shows continuous, healthy build progress with no stalls:
followed by Implicated commit: none — the failure is unrelated to File: n/a (failure occurred in CI infrastructure; last build activity: Suggested fix:
Related: none found — a search of the repo's issues/PRs for this agent-shutdown signature returned no matching reports (only unrelated open PRs).
|
What
Preserve endpoint-fence ordering for RMA rendezvous PUT and GET operations.
Why
This is Part 5 of 5 of an updated split of the earlier endpoint-fence PR #11199.
Rendezvous operations can start delayed nested remote work. Part 4 activates asynchronous endpoint fences for normal RMA/atomic traffic, but without rendezvous accounting a later fence could advance before that nested remote work is known to be complete. This PR completes the fence design for rendezvous operations.
How
Draft — merge only after PR #11926 is merged.