Repository navigation
[TransferEngine] Add optional HugeTLB path for create_shared_segment - #4152
Closed
ascend-direct-dev wants to merge 1 commit into
Closed
ascend-direct-dev wants to merge 1 commit into
ascend-direct-dev wants to merge 1 commit into
Conversation
Keep the default create_shared_segment mmap path on THP. Opt in with hugetlb=true so the memfd uses MFD_HUGETLB and fails closed if the HugeTLB pool cannot back the span. Co-authored-by: Cursor <cursoragent@cursor.com>
ascend-direct-dev
marked this pull request as ready for review
September 18, 2026 09:33
ascend-direct-dev
requested review from
ShangmingCai,
alogfans,
chestnut-Q,
doujiang24,
staryxchen,
stmatengss and
zxpdemonio
as code owners
September 18, 2026 09:33
14 of 31 tasks
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
WIP. Adds an explicit
hugetlb=falseopt-in oncreate_shared_segment/SharedSegment::Create.The default mmap path is unchanged: unnamed memfd plus
MADV_HUGEPAGE(THP), no HugeTLB pool.hugetlb=trueusesMFD_HUGETLBand fails closed ifvm.nr_hugepagescannot back the span. Mixing THP and HugeTLB blobs in the same group is rejected via the fingerprint.This is the shared-segment follow-up to #3952. It does not change TENT / Ascend Direct.
Module
mooncake-transfer-engine)mooncake-store)mooncake-conductor)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:
Locally, with a HugeTLB pool reserved,
SharedSegmentHugeTlbTest.*mapped 2MiBhtpages, two ranks/processes shared the same pages, and HostRegister still produced a device VA. Defaulthugetlb=falsedid not consumeHugePages_Free.Checklist
./scripts/code_format.shAI Assistance Disclosure
Cursor Grok 4.6 helped draft the HugeTLB memfd path, Python/
create_shared_segmentplumbing, and unit tests. Every changed line was reviewed by the submitter.Made with Cursor