-
Notifications
You must be signed in to change notification settings - Fork 240
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
Added cgroup type #324
Added cgroup type #324
Conversation
7519b18
to
bdc9913
Compare
Add domain threaded and domain invalid cgroup type for cgroup v2. Signed-off-by: yaoyinnan <35447132+yaoyinnan@users.noreply.github.com>
bdc9913
to
efd477f
Compare
Domain CgroupType = "domain" | ||
DomainThreaded CgroupType = "domain threaded" | ||
DomainInvalid CgroupType = "domain invalid" | ||
Threaded CgroupType = "threaded" |
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.
@yaoyinnan @dcantah @mxpv Wondering if additional changes were needed as part of this; I see Manager.Delete()
has a special case for Threaded
; should the same code be called when it encounters DomainThreaded
("domain threaded")?
Lines 479 to 490 in d4e976d
// Kernel prevents cgroups with running process from being removed, | |
// check the tree is empty. | |
// | |
// Pick the right file to read based on the cgs type. | |
cgType, err := c.GetType() | |
if err != nil { | |
if !os.IsNotExist(err) { | |
return err | |
} | |
} else { | |
threaded = cgType == Threaded | |
} |
Lines 492 to 496 in d4e976d
if threaded { | |
tasks, err = c.Threads(true) | |
} else { | |
tasks, err = c.Procs(true) | |
} |
code above was added in this PR;
Add domain threaded and domain invalid cgroup type.