mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libcontainer: cgroups: add pids controller support
Add support for the pids cgroup controller to libcontainer, a recent feature that is available in Linux 4.3+. Unfortunately, due to the init process being written in Go, it can spawn an an unknown number of threads due to blocked syscalls. This results in the init process being unable to run properly, and thus small pids.max configs won't work properly. Signed-off-by: Aleksa Sarai <asarai@suse.com>
This commit is contained in:
@@ -456,6 +456,7 @@ func createCgroupConfig(name string, spec *specs.LinuxRuntimeSpec, devices []*co
|
||||
c.Resources.CpuRtPeriod = r.CPU.RealtimePeriod
|
||||
c.Resources.CpusetCpus = r.CPU.Cpus
|
||||
c.Resources.CpusetMems = r.CPU.Mems
|
||||
c.Resources.PidsLimit = r.Pids.Limit
|
||||
c.Resources.BlkioWeight = r.BlockIO.Weight
|
||||
c.Resources.BlkioLeafWeight = r.BlockIO.LeafWeight
|
||||
for _, wd := range r.BlockIO.WeightDevice {
|
||||
|
||||
Reference in New Issue
Block a user