-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runc update: fix updating swap for cgroup v2
This allows to do runc update $ID --memory=-1 --memory-swap=$VAL for cgroup v2, i.e. set memory to unlimited and swap to a specific value. This was not possible because ConvertMemorySwapToCgroupV2Value rejected memory=-1 ("unlimited"). In a hindsight, it was a mistake, because if memory limit is unlimited, we should treat memory+swap limit as just swap limit. Revise the unit test; add description to each case. Fixes: c86be8a ("cgroupv2: fix setting MemorySwap") Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information
Showing
2 changed files
with
38 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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