Thanks to visit codestin.com
Credit goes to github.com

Skip to content

runsc/cgroup: set swap for precreated cgroups#13424

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl930735286
Jun 11, 2026
Merged

runsc/cgroup: set swap for precreated cgroups#13424
copybara-service[bot] merged 2 commits into
masterfrom
test/cl930735286

Conversation

@copybara-service

Copy link
Copy Markdown

runsc/cgroup: set swap for precreated cgroups

Summary

  • honor OCI LinuxResources.Memory.Swap for cgroup v2 paths that were pre-created by the caller
  • keep the existing pre-created-cgroup ownership behavior for other resource knobs, so runsc does not overwrite pod CPU or memory limits it does not own
  • add a regression test that verifies memory.swap.max is updated while memory.max stays untouched

Fixes #13267

Testing

  • git diff --check
  • bazel test //runsc/cgroup:cgroup_test (fails before running tests on this macOS host because /usr/bin/x86_64-linux-gnu-gcc is not installed for the //vdso:vdso genrule)

FUTURE_COPYBARA_INTEGRATE_REVIEW=#13276 from Haihan-Jiang:codex/gvisor-cgroup-swap b393e6f

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jun 11, 2026
@copybara-service copybara-service Bot merged commit d127ea0 into master Jun 11, 2026
0 of 2 checks passed
@copybara-service copybara-service Bot deleted the test/cl930735286 branch June 11, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runsc does not honor OCI LinuxResources.Memory.Swap when joining the pod cgroup, leaving K8s LimitedSwap unenforced for gVisor pods

2 participants