mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Kernel has no limit for memory reservation, but in different kernel versions, the default behavior is different. On kernel 3.13, docker run --rm --memory-reservation 1k busybox cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes the output would be 4096, but on kernel 4.1, the output is 0. Since we have minimum limit for memory and kernel memory, we can have this limit for memory reservation as well, to make the behavior consistent. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Upstream-commit: 50a61810056a421fb94acf26277995f2c1f31ede Component: engine