Repository navigation
Conversation
tamird
force-pushed
the
proposal/cgroup-v2-effective-memory
branch
from
November 2, 2026 09:02
defd36c to
8c31f62
Compare
Contributor
Author
Contributor
Author
|
@manninglucas, could you review the changes to Posted by Codex on behalf of @tamird. |
A sandbox under a 512 MiB pod can report the host's memory in /proc/meminfo when neither its own cgroup nor its immediate parent sets a limit. Setting a larger limit on the sandbox itself also hides the pod's ceiling. Linux charges the sandbox to all three cgroups. Use the smallest memory.max from the sandbox to the root of the visible cgroup hierarchy. Check MemTotal from inside a sandbox with an unlimited, larger or smaller leaf limit. Signed-off-by: Tamir Duberstein <[email protected]>
tamird
force-pushed
the
proposal/cgroup-v2-effective-memory
branch
from
November 17, 2026 18:43
8c31f62 to
e96ff96
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.
A sandbox under a 512 MiB pod can report the host's memory in
/proc/meminfo if its own cgroup and its immediate parent set no limit.
Setting a larger limit on the sandbox itself can also hide the pod's
ceiling. At startup, runsc now takes the smallest memory.max from the
sandbox to the root of the visible cgroup hierarchy.
The regression test starts runsc under real host cgroups, then reads
/proc/meminfo inside the sandbox. With an unlimited, 768 MiB, or
384 MiB leaf under a 512 MiB ancestor, the fixed sandbox reported
512, 512, and 384 MiB. Before the fix it reported host memory,
768 MiB, and 384 MiB 1.
This is a runsc startup test. The same read on native Linux reports
host memory in all three leaf cgroups 2. A syscall test that creates
a cgroup inside an already running sandbox cannot exercise runsc's
choice of the guest memory size at startup.