-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cgroup2: cpuset_v2: skip Apply when no limit is specified #2148
cgroup2: cpuset_v2: skip Apply when no limit is specified #2148
Conversation
Signed-off-by: Akihiro Suda <[email protected]>
@@ -22,11 +22,14 @@ func (s *CpusetGroupV2) Name() string { | |||
} | |||
|
|||
func (s *CpusetGroupV2) Apply(d *cgroupData) error { | |||
if d.config.Resources.CpusetCpus == "" && d.config.Resources.CpusetMems == "" { | |||
return nil | |||
} | |||
dir, err := d.path("cpuset") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not directly related to this PR, but I'm not convinced of d.path()
logic in v2 Apply()
functions.
We should check controller availability and maybe write cgroup.subtree_control
as crun does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @giuseppe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think we should try to enable controllers that are needed
LGTM |
But should we still join the controllers like in v1, even if no limits are set? Do we still have to join everything to collect stats on the processes? |
For unified hierarchy, I think joining (writing |
Signed-off-by: Akihiro Suda [email protected]
Fix #2143