Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com> Upstream-commit: dcc50e1d593fd7995189872791c6d7a013f16970 Component: engine
This commit is contained in:
@ -111,6 +111,7 @@ type Resources struct {
|
||||
CpuShares int64 `json:"cpu_shares"`
|
||||
CpusetCpus string `json:"cpuset_cpus"`
|
||||
CpusetMems string `json:"cpuset_mems"`
|
||||
CpuQuota int64 `json:"cpu_quota"`
|
||||
Rlimits []*ulimit.Rlimit `json:"rlimits"`
|
||||
}
|
||||
|
||||
@ -206,6 +207,7 @@ func SetupCgroups(container *configs.Config, c *Command) error {
|
||||
container.Cgroups.MemorySwap = c.Resources.MemorySwap
|
||||
container.Cgroups.CpusetCpus = c.Resources.CpusetCpus
|
||||
container.Cgroups.CpusetMems = c.Resources.CpusetMems
|
||||
container.Cgroups.CpuQuota = c.Resources.CpuQuota
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user