Repository navigation
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>
|
🤖 Starting review — findings will be posted here when done. |
| is_proto = req->flags & UCP_REQUEST_FLAG_PROTO_SEND; | ||
| req->flags &= ~UCP_REQUEST_FLAG_FENCE_BLOCKED; | ||
|
|
||
| for (batch = 0; batch < UCP_EP_FENCE_PROGRESS_BATCH; ++batch) { |
There was a problem hiding this comment.
Can we confirm req->send.uct.func never frees the request when it returns UCS_INPROGRESS/UCS_ERR_NO_RESOURCE/UCP_STATUS_FENCE_DEFER? The batch loop and the subsequent requeue dereference req after the call, and the address_free annotation suggests the callback may free it.
| #define ucp_trace_req(_sreq, _message, ...) \ | ||
| ucs_trace_req("req %p: " _message, (_sreq), ## __VA_ARGS__) | ||
|
|
||
| #define UCP_STATUS_FENCE_DEFER ((ucs_status_t)(UCS_ERR_LAST + 1)) |
There was a problem hiding this comment.
UCP_STATUS_FENCE_DEFER aliases a normal error code (-99), so UCS_STATUS_IS_ERR and UCS_PTR_IS_ERR both treat it as an error. Only ucp_ep_fence_dispatch_request special-cases it. Since it flows out of a uct_pending_callback_t, can we document/assert that no generic pending-return path can observe it?
|
blocker: this PR is well over the 500-added-line limit and bundles several independent changes (lane-generation tracking, selective-lane flush, and the non-blocking fence pending-queue). Can we split it — e.g. the flush/lane-generation refactor separate from the async fence machinery — so each is reviewable on its own?
The non-blocking fence path ( Test coverage note: The new gtests are thorough for the lane-state helpers and the fence-queue mechanics, and the EXPECTED_SIZE update is consistent with the added ucp_ep_ext_t/ucp_request_t fields. However, because the async fence path is not wired to any real RMA/AMO flow, there is no end-to-end regression coverage for the feature it implements — the tests exercise the machinery directly with synthetic stack requests only. |
|
🤖 CI Triage Agent — TL;DR: Full analysisSummary: gtest shard 1 aborted with a UCS assertion failure in Root cause: From the backtrace in the build log, the call chain is:
Implicated commit: [REDACTED:Hex High Entropy String] — "UCP/FENCE: Preserve fence state across lane changes", Nathan Bellalou (builds on [REDACTED:Hex High Entropy String] "Add asynchronous endpoint fence engine" and acded49 "topology-safe selective endpoint flush") File: src/ucp/rma/rma.inl:178-189 (with src/ucp/rma/rma.h:50-59 and the assertion at src/ucp/rma/flush.c:83; blocking path src/ucp/rma/flush.c:924-949) Suggested fix:
Related: PR #11925 (this PR), PR #11871 "UCP/RMA: Make EP-based fence non-blocking and failover-safe"
|
|
🤖 CI Triage Agent — TL;DR: The Coverity Full analysisSummary: Azure Pipelines "Coverity coverity devel on coverity_rh7" step aborted with Root cause: Coverity reported an explicit null dereference at
So on the path where the mock never fires, a NULL Implicated commit: File: Suggested fix: Make the precondition fatal so no path reaches request = ucp_ep_flush_lanes_internal(
ep, 0, ¶m, NULL, test_flush_completion,
"replace_lane_during_flush", UCT_FLUSH_FLAG_LOCAL, UCS_BIT(0));
if (!UCS_PTR_IS_PTR(request) || (test_flush_comp == NULL)) {
ucp_ep_set_lane(ep, 0, original_lane);
iface->ops.ep_flush = flush_func;
UCP_WORKER_THREAD_CS_EXIT_CONDITIONAL(ep->worker);
UCS_TEST_ABORT("selective flush did not start, comp=" <<
test_flush_comp);
}
EXPECT_EQ(1u, test_flush_call_count);
EXPECT_EQ(original_lane, test_flush_eps[0]);Apply the same guard before the second Related: PR #11925 (branch
|
What
Preserve endpoint-fence state when lane topology changes during failover or endpoint reconfiguration.
Why
This is Part 3 of 5 of an updated split of the earlier endpoint-fence PR #11199.
An asynchronous fence can remain pending while the endpoint changes configuration. Before normal RMA/atomic traffic starts using the engine, it must be safe to reconcile the lanes to flush and to keep valid deferred work across that change.
How
Draft — merge only after PR #11924 is merged.