cgroupv2+systemd: set MemoryLow
For some reason, this was not set before. Test case is added by the next commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
4fc9fa05da
commit
e4a84bea99
|
@ -53,6 +53,10 @@ func genV2ResourcesProperties(c *configs.Cgroup) ([]systemdDbus.Property, error)
|
|||
properties = append(properties,
|
||||
newProp("MemoryMax", uint64(c.Resources.Memory)))
|
||||
}
|
||||
if c.Resources.MemoryReservation != 0 {
|
||||
properties = append(properties,
|
||||
newProp("MemoryLow", uint64(c.Resources.MemoryReservation)))
|
||||
}
|
||||
// swap is set
|
||||
if c.Resources.MemorySwap != 0 {
|
||||
swap, err := cgroups.ConvertMemorySwapToCgroupV2Value(c.Resources.MemorySwap, c.Resources.Memory)
|
||||
|
|
Loading…
Reference in New Issue