Repository navigation
[Bugfix][TENT] Register notify recv slots with one MR per endpoint - #3820
Conversation
High-concurrency PD created 256 independent notify recv MRs per RDMA endpoint, exhausting MR capacity while QP tables were still sparse. Match the send path: one contiguous 256x64KiB buffer and one ibv_reg_mr, then slice by slot. Signed-off-by: staryxchen <staryxchen@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com>
catyans
left a comment
There was a problem hiding this comment.
LGTM. Re-reviewed the current head: all recv slots retain stable 64 KiB offsets inside one contiguous backing buffer and share the single MR's lkey; wr_id remains the slot index, decoding is bounded by the completion length, and teardown keeps the backing buffer alive until QP destruction and MR deregistration succeed. Partial-construction cleanup remains intact. CI is green, and the A/B results validate the intended MR reduction and removal of the observed ENOMEM failures.
suggestion (non-blocking): add a mock-verbs lifecycle test asserting that endpoint construction registers exactly one notify recv MR and cleanup deregisters it exactly once. The current hardware-free tests cover slot arithmetic and payload isolation well, but do not directly pin the registration-count invariant.
Description
High-concurrency PD disaggregation registered 256 independent 64KiB notify
recv MRs per TENT RDMA endpoint. Endpoint count scales with
#session × #NIC, soibv_reg_mr/ibv_create_qpreturned ENOMEM whileHCA
max_qpwas still far from full.Match the notify send path: one contiguous
256 × 64KiBrecv buffer, oneibv_reg_mr, then slice by slot. Slot encode/decode is shared with send soadjacent slots cannot mix payloads.
Module
mooncake-transfer-engine)mooncake-store)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Test commands:
Test results:
tent_endpoint_lifecycle_test(20) andtent_rdma_transport_test(24) passed,including slot-adjacency / no-crosstalk / oversized-payload tests.
A/B on the same host and load:
ibv_create_qpENOMEMB peak MR matches
data MR + #endpoint × (1 recv + 1 send).Checklist
./scripts/code_format.shAI Assistance Disclosure
Cursor Grok 4.6 implemented the recv-MR coalescing, slot encode/decode tests,
and the A/B run. The human submitter reviewed every changed line.
Made with Cursor