[Bugfix] Resolve RDMA NUMA location after memory registration - #4333
Open
jacklin78911-collab wants to merge 2 commits into
Open
jacklin78911-collab wants to merge 2 commits into
jacklin78911-collab wants to merge 2 commits into
Conversation
jacklin78911-collab
marked this pull request as ready for review
September 26, 2026 10:05
jacklin78911-collab
requested review from
alogfans,
chestnut-Q,
doujiang24 and
staryxchen
as code owners
September 26, 2026 10:05
staryxchen
approved these changes
Sep 26, 2026
staryxchen
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. @stmatengss please double-check, thx~
Comment on lines
+526
to
+529
| if (entries.empty()) { | ||
| unregisterChunkMRs(chunk_addr); | ||
| return -1; | ||
| } |
Collaborator
There was a problem hiding this comment.
getMemoryLocation() never returns an empty vector. A missing NUMA node and a failed numa_move_pages both come back as one entry with location *, so this entries.empty() branch cannot run. On a real query failure the code publishes * and does not roll back.
Delete the empty check and use entries[0].location directly. LaterRegistrationFailureStillRollsBack covers a later ibv_reg_mr failure, not this branch.
This branch has not been deployed
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.
Description
Untouched anonymous host memory has no NUMA node before registration. Resolving its location at that point records
*in the RDMA buffer metadata, allowing NIC selection across unrelated NUMA nodes even after registration pins the pages. This is the registration-order regression reported in #4322.Resolve the original buffer's first-page location after the first chunk's MRs are registered, then reuse that location for all chunks. Explicit locations, registration parallelism and transfer-path selection are unchanged. A failed NUMA query retains the existing
*fallback; it does not trigger registration rollback.This addresses #4322 without a new placement policy or pre-touch pass. #3657 concerns Store allocation placement; #1974 concerns GPU/PCI topology ranking; neither fixes this registration ordering.
Module
mooncake-transfer-engine)Type of Change
How Has This Been Tested?
Linux CPU build from
16b7ba3c,USE_CUDA=OFF,USE_TENT=OFF:cmake --build build --target rdma_memory_location_test rdma_context_reprobe_test rdma_buffer_range_index_test rdma_transport_submit_task_test -j4 ctest --test-dir build --output-on-failure --no-tests=error \ -R '^(rdma_memory_location_test|rdma_context_reprobe_test|rdma_buffer_range_index_test|rdma_transport_submit_task_test)$'*on the original code andcpu:1with this fix.Checklist
./scripts/code_format.shAI Assistance Disclosure