From: Christian Brauner <brauner@kernel.org>
To: Tejun Heo <tj@kernel.org>, Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>,
Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
cgroups@vger.kernel.org, containers@lists.linux.dev,
Christian Brauner <christian.brauner@ubuntu.com>
Subject: [PATCH v3 2/5] docs/cgroup: add entry for cgroup.kill
Date: Sat, 8 May 2021 14:15:39 +0200 [thread overview]
Message-ID: <20210508121542.1269256-2-brauner@kernel.org> (raw)
In-Reply-To: <20210508121542.1269256-1-brauner@kernel.org>
From: Christian Brauner <christian.brauner@ubuntu.com>
Give a brief overview of the cgroup.kill functionality.
Link: https://lore.kernel.org/r/20210503143922.3093755-2-brauner@kernel.org
Cc: Roman Gushchin <guro@fb.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: cgroups@vger.kernel.org
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
/* v2 */
- Roman Gushchin <guro@fb.com>:
- Drop sentence that mentions combined useage of cgroup.kill and
cgroup.freezer.
/* v3 */
unchanged
---
Documentation/admin-guide/cgroup-v2.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 64c62b979f2f..6adc749d863e 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -949,6 +949,21 @@ All cgroup core files are prefixed with "cgroup."
it's possible to delete a frozen (and empty) cgroup, as well as
create new sub-cgroups.
+ cgroup.kill
+ A write-only single value file which exists in non-root cgroups.
+ The only allowed value is "1".
+
+ Writing "1" to the file causes the cgroup and all descendant cgroups to
+ be killed. This means that all processes located in the affected cgroup
+ tree will be killed via SIGKILL.
+
+ Killing a cgroup tree will deal with concurrent forks appropriately and
+ is protected against migrations.
+
+ In a threaded cgroup, writing this file fails with EOPNOTSUPP as
+ killing cgroups is a process directed operation, i.e. it affects
+ the whole thread-group.
+
Controllers
===========
--
2.27.0
next prev parent reply other threads:[~2021-05-08 12:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 12:15 [PATCH v3 1/5] cgroup: introduce cgroup.kill Christian Brauner
2021-05-08 12:15 ` Christian Brauner [this message]
2021-05-08 12:15 ` [PATCH v3 3/5] tests/cgroup: use cgroup.kill in cg_killall() Christian Brauner
2021-05-08 12:15 ` [PATCH v3 4/5] tests/cgroup: move cg_wait_for(), cg_prepare_for_wait() Christian Brauner
2021-05-08 12:15 ` [PATCH v3 5/5] tests/cgroup: test cgroup.kill Christian Brauner
2021-05-10 22:02 ` Shakeel Butt
2021-05-10 14:42 ` [PATCH v3 1/5] cgroup: introduce cgroup.kill Tejun Heo
2021-05-10 14:49 ` Christian Brauner
2021-05-10 15:39 ` Jonathan Corbet
2021-05-10 16:43 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210508121542.1269256-2-brauner@kernel.org \
--to=brauner@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux.dev \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=lizefan.x@bytedance.com \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox