From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Brauner Subject: [PATCH 2/5] docs/cgroup: add entry for cgroup.kill Date: Thu, 29 Apr 2021 14:01:10 +0200 Message-ID: <20210429120113.2238065-2-brauner@kernel.org> References: <20210429120113.2238065-1-brauner@kernel.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619697706; bh=oPVrQiSH4gJIxWe/7Tc1T6o/zmAuBj23mR9CFaPe9Ec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/Rdo/fHTGnVIBbJz0jV8Xe2zbhkNwR9FsQ2+YHjQ+7djeQd0OSGTeYDr0Hyt12Tg Ol/URpqxTpjc39VJS6FwwaFoSLdWhwunRvF4iuiKFG4b1SoM0PLaLED4dYy8bog06d aNWyc41AuDorgahEE1kNWQUzQfSZ8yKoNUg1sBGDMXNs/IzJYZxv7dlq4kVbFhgbAO dF+y6vCHMJKfux3+X3lPM3P8EecWB2HJM0SkFdLO2WKQWcOL/MkKG3sV4YW3ocAfll IzgpgrWk1D5KOdYFcF1pU663y+6nOFAIo/96qKA5WZ/fy/ostj31PLMvgNqmZutgt9 nByaTNrt+aOCg== In-Reply-To: <20210429120113.2238065-1-brauner-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" To: Tejun Heo , Roman Gushchin Cc: Shakeel Butt , Zefan Li , Johannes Weiner , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christian Brauner From: Christian Brauner Give a brief overview of the cgroup.kill functionality. Cc: Roman Gushchin Cc: Tejun Heo Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Christian Brauner --- Documentation/admin-guide/cgroup-v2.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 64c62b979f2f..c9f656a84590 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -949,6 +949,23 @@ 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. If callers require strict guarantees + they can issue the cgroup.kill request after a freezing the cgroup via + cgroup.freeze. + + 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