Repository navigation
UCT/IB/MLX5: Handle relaxed-only fence ordering - #11721
Conversation
|
🤖 Starting review — findings will be posted here when done. |
|
@roiedanino after refining, please ping @nbellalou for review. |
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
b80db9d to
3c8e0f7
Compare
| UCT_RC_MLX5_EP_ADDR_FLAG_NO_ATOMIC_OFFSET = UCS_BIT(1) | ||
| UCT_RC_MLX5_EP_ADDR_FLAG_NO_ATOMIC_OFFSET = UCS_BIT(1), | ||
| UCT_RC_MLX5_EP_ADDR_FLAG_RELAXED_ORDER = UCS_BIT(2), | ||
| UCT_RC_MLX5_EP_ADDR_FLAG_ORDERING_CAP = UCS_BIT(3) |
| uint8_t dci_channel_index; | ||
| uct_ib_fence_info_t fi; |
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
| * compatibility */ | ||
| }; | ||
|
|
||
|
|
| return UCT_RC_MLX5_TM_ENABLED(iface) ? UCT_RC_MLX5_IFACE_ADDR_TYPE_TM : | ||
| UCT_RC_MLX5_IFACE_ADDR_TYPE_BASIC; | ||
| return UCT_RC_MLX5_TM_ENABLED(iface) ? UCT_RC_MLX5_IFACE_ADDR_TYPE_TM : | ||
| UCT_RC_MLX5_IFACE_ADDR_TYPE_BASIC; |
| iface->config.put_fence_flag = | ||
| iface->config.send_fence_flag = | ||
| strong_order ? UCT_IB_MLX5_WQE_CTRL_FLAG_STRONG_ORDER : 0; | ||
| iface->config.put_fence_flag = | ||
| strong_order ? UCT_IB_MLX5_WQE_CTRL_FLAG_STRONG_ORDER : 0; |
There was a problem hiding this comment.
why do we need send_fence_flag if it follows the same logic as put_fence_flag
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
| typedef enum { | ||
| /* Indicates that this specific dci is shared, regardless of policy */ | ||
| UCT_DC_DCI_FLAG_SHARED = UCS_BIT(0), | ||
| UCT_DC_DCI_FLAG_SHARED = UCS_BIT(0) |
|
|
||
|
|
||
| #define REVERSE_SL_MASK UCS_MASK(4) | ||
| #define REVERSE_SL_MASK UCS_MASK(4) |
Signed-off-by: Roie Danino <rdanino@nvidia.com>
| UCT_DC_MLX5_EP_FLAG_INVALIDATED = UCS_BIT(12) | ||
| UCT_DC_MLX5_EP_FLAG_INVALIDATED = UCS_BIT(12), | ||
| #else | ||
| UCT_DC_MLX5_EP_FLAG_INVALIDATED = 0 | ||
| UCT_DC_MLX5_EP_FLAG_INVALIDATED = 0, |
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
Signed-off-by: Roie Danino <rdanino@nvidia.com>
|
@Artemy-Mellanox @evgeny-leksikov |
|
🤖 Starting review — findings will be posted here when done. |
|
|
||
| status = uct_dc_mlx5_ep_flush_remote_post( | ||
| ep, uct_dc_mlx5_ep_fence_flush_handler, NULL, fence_state); | ||
| if (status != UCS_INPROGRESS) { |
There was a problem hiding this comment.
The status == UCS_ERR_NO_RESOURCE branch is only reachable via the UCT_RC_IFACE_GET_TX_DESC failure inside uct_dc_mlx5_ep_flush_remote_post; that path is easy to miss because flush_remote_post otherwise always returns UCS_INPROGRESS. Consider a one-line comment noting the NO_RESOURCE comes from TX-desc exhaustion, to make the control flow obvious.
| #endif | ||
| } | ||
|
|
||
| UCS_TEST_SKIP_COND_P(test_rc, relaxed_order_required_rejects_verbs, |
There was a problem hiding this comment.
The test only exercises the iface_open UNSUPPORTED path; it does not cover the new uct_rc_verbs_query_tl_devices filtering (device excluded from resource list). The dc side has relaxed_order_required_hides_invalid_flush_rkey for the query path; a symmetric check for rc_verbs would close the gap.
| UCT_DC_MLX5_CHECK_DCI_RES(_iface, _ep) \ | ||
| UCT_RC_CHECK_NUM_RDMA_READ_RET(&(_iface)->super.super, \ | ||
| UCS_ERR_NO_RESOURCE) \ | ||
| if (ucs_unlikely((_ep)->flags & UCT_DC_MLX5_EP_FLAG_FENCE_FLUSH)) { \ |
There was a problem hiding this comment.
maybe common macro for check_fence to use here and in UCT_DC_CHECK_RES_PTR
| ucs_debug("%s: dc_mlx5 does not support relaxed-only memory keys " | ||
| "without a valid flush rkey", | ||
| uct_ib_device_name(&ib_md->dev)); | ||
| *tl_devices_p = NULL; |
There was a problem hiding this comment.
isn't return UCS_ERR_NO_DEVICE not enough here?
| uct_dc_mlx5_ep_fence_state(ep); | ||
| uct_rc_iface_send_op_t *op = fence_state->fence_op; | ||
|
|
||
| ucs_assertv(op != NULL, "fence flush operation for endpoint %p was not found", |
There was a problem hiding this comment.
why asserr+silent skip? maybe assert_always?
Signed-off-by: Roie Danino <rdanino@nvidia.com>
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
|
🤖 CI Triage Agent — TL;DR: The Full analysisSummary: Root cause: The only failing case is the GDA device-side remote counter test in the "lazy" send mode ( Caveat on evidence: the retrievable Azure log is only the tail of the task output, so the gtest assertion text/line for the failing case itself is not in the fetched text — the attribution above is based on the failing test identity plus the PR's changed code, not on a captured assertion message. Implicated commit: File: Suggested fix:
Related: PR #11721 (this PR); prerequisite work #11649 ("UCT/IB: Support relaxed-only memory keys",
|
What?
Handle UCT fence ordering for IB devices whose data memory keys are limited to relaxed ordering.
Why?
Strict data memory keys previously supplied ordering that some RC and DC fence sequences relied on. Devices limited to relaxed-order data keys remove that implicit ordering, so the IB transports must provide the required ordering explicitly.
How?
RC maps the local relaxed-only requirement to the existing strong-order WQE fence flags. DC keeps the existing flush-key address capability, resolves RC_FENCE=auto to weak fence mode for relaxed-only memory domains, and performs a per-endpoint remote-read barrier before later operations proceed. No UCT or UCP API and no new wire capability are added. Incompatible DC addresses are rejected during reachability instead of failing after transport selection.