-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
cgroups: v2 should use kill interface instead of freezer #14371
Labels
Comments
shoenig
added a commit
that referenced
this issue
Aug 29, 2022
This PR refactors the cgroups v2 group kill code path to use the cgroups.kill interface file for destroying the cgroup. Previously we copied the freeze + sigkill + unfreeze pattern from the v1 code, but v2 provides a more efficient and more race-free way to handle this. Closes #14371
shoenig
added a commit
that referenced
this issue
Aug 30, 2022
This PR refactors the cgroups v2 group kill code path to use the cgroups.kill interface file for destroying the cgroup. Previously we copied the freeze + sigkill + unfreeze pattern from the v1 code, but v2 provides a more efficient and more race-free way to handle this. Closes #14371
shoenig
added a commit
that referenced
this issue
Aug 30, 2022
This PR refactors the cgroups v2 group kill code path to use the cgroups.kill interface file for destroying the cgroup. Previously we copied the freeze + sigkill + unfreeze pattern from the v1 code, but v2 provides a more efficient and more race-free way to handle this. Closes #14371
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When implementing support for cgroups v2 we mostly tried to keep the v1 logic but retrofit it onto v2. This includes the block of code for forcefully killing processes related to a task https://github.com/hashicorp/nomad/blob/v1.3.4/client/lib/cgutil/group_killer.go#L98
In v2, there is now the
cgroup.kill
interface file, which we can simply write a1
into to kill all processes present in the cgroup (i.e. show up incgroup.procs
). Unlikecgroup.freeze
,cgroup.kill
handles racy forkers.The text was updated successfully, but these errors were encountered: