Skip to content

Commit

Permalink
Merge pull request #293 from zhuangqh/fix/v2-cpuset-ctrl
Browse files Browse the repository at this point in the history
cgroup2: only enable the cpuset controller if cpus or mems is specified
  • Loading branch information
AkihiroSuda authored May 10, 2023
2 parents dcd0bca + 46d9229 commit 474049b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cgroup2/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ func (r *Resources) Values() (o []Value) {
func (r *Resources) EnabledControllers() (c []string) {
if r.CPU != nil {
c = append(c, "cpu")
c = append(c, "cpuset")
if r.CPU.Cpus != "" || r.CPU.Mems != "" {
c = append(c, "cpuset")
}
}
if r.Memory != nil {
c = append(c, "memory")
Expand Down

0 comments on commit 474049b

Please sign in to comment.