diff options
author | Hironori Shiina <shiina.hironori@jp.fujitsu.com> | 2021-11-11 11:27:05 -0500 |
---|---|---|
committer | Hironori Shiina <shiina.hironori@jp.fujitsu.com> | 2021-11-12 13:20:20 -0500 |
commit | 9226ccb59f5967f5c784280b993711530615dcd7 (patch) | |
tree | b706751e55c134039957a3a94f707cfb8feab6da /pkg/specgenutil | |
parent | 0aecacb8655d65cb55ec09a9629a358236e6af73 (diff) | |
download | podman-9226ccb59f5967f5c784280b993711530615dcd7.tar.gz podman-9226ccb59f5967f5c784280b993711530615dcd7.tar.bz2 podman-9226ccb59f5967f5c784280b993711530615dcd7.zip |
Enable 'podman run --memory-swappiness=0'
'--memory-swappiness=0' used to work. This patch fixes the regression
issue, which was caused by the change of infra container creation
process.
Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Diffstat (limited to 'pkg/specgenutil')
-rw-r--r-- | pkg/specgenutil/specgen.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go index 4e8f954fb..04d3add32 100644 --- a/pkg/specgenutil/specgen.go +++ b/pkg/specgenutil/specgen.go @@ -172,7 +172,7 @@ func getMemoryLimits(s *specgen.SpecGenerator, c *entities.ContainerCreateOption memory.Kernel = &mk hasLimits = true } - if c.MemorySwappiness > 0 { + if c.MemorySwappiness >= 0 { swappiness := uint64(c.MemorySwappiness) memory.Swappiness = &swappiness hasLimits = true |