[Bugfix] Guard cache hugepage allocation in Kubernetes#965
Draft
dante159753 wants to merge 2 commits into
Draft
Conversation
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.
What changed
cache_use_hugepageCacheStore option, defaulting tofalse.io_directindependent from explicit hugepage allocation: direct I/O host buffers no longer tryMAP_HUGETLBunlesscache_use_hugepage: trueis set.MADV_NOHUGEPAGE; when enabled, they retain the existing 1GiB -> 2MiB hugetlb fallback and anonymous mmap with hugepage advice.Why
In Kubernetes deployments, hugetlb/TLB resources can be visible inside a pod while not actually being usable by that pod because the pod cgroup has no usable hugepage quota or the runtime has not mounted/configured hugepages correctly. In that state, UCM's previous default direct-I/O path tried explicit hugetlb allocation during service startup, which could fail or proceed into an unstable allocation path and cause vLLM engine initialization to abort.
The safer default is to avoid explicit hugepage allocation unless the operator opts in after confirming the pod has usable hugepage resources.
Impact
io_direct: truestill enables direct I/O, but does not imply explicit hugetlb allocation by default.cache_use_hugepage: true.Verification
git diff --checkcodespellvia pre-commit during commitcmakeis not installed in this workspace.