Repository navigation
cgroup: set hugetlb reservation limits - #2390
Merged
Merged
Conversation
Since Linux 5.7, the hugetlb controller has reservation accounting (hugetlb.<size>.rsvd.max on cgroup v2, hugetlb.<size>.rsvd.limit_in_bytes on cgroup v1), which also covers huge pages that are reserved but not yet faulted in. The runtime spec says hugepageLimits should use it when supported, falling back to page fault accounting otherwise. Write the limit to the rsvd file as well, unless it does not exist. This is similar to what runc does. Fixes: containers#2284 Assisted-by: Claude Code (claude-opus-5-5) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Check that hugepageLimits are set for every available huge page size, including the reservation limits, if supported by the kernel. Assisted-by: Claude Code (claude-opus-5-5) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
kolyshkin
force-pushed
the
hugetlb-rsvd
branch
from
October 20, 2026 23:48
f2efd4e to
66b3f08
Compare
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.
Since Linux 5.7, the hugetlb controller has reservation accounting
(
hugetlb.<size>.rsvd.maxon cgroup v2,hugetlb.<size>.rsvd.limit_in_byteson cgroup v1). The runtime spec says
hugepageLimitsshould use it whensupported, but crun only set the page fault accounting limit.
Write the limit to the rsvd file as well, unless it does not exist.
Also, add a test which checks hugetlb limits (including rsvd ones, if
available) for all available huge page sizes. Tested locally on CentOS
Stream 10 and Fedora; without the fix, the test fails as expected.
Fixes: #2284
Supersedes: #2387, #2290