Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4353780imu; Fri, 30 Nov 2018 15:49:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/XkcmxTqJPEf/9d1wZ/crqi3AZFa675BuwA9aPMTNYA4YPDabfLLCnIpAAYJkrM5xYhWFmi X-Received: by 2002:a17:902:292b:: with SMTP id g40mr7675269plb.82.1543621756133; Fri, 30 Nov 2018 15:49:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543621756; cv=none; d=google.com; s=arc-20160816; b=N6SiJiXnvzQDTKdjxKb0ta9Hyw5zURogA64ykL0xMwZ7iid9edd3NMhbP2RI2MbEy7 rTGCY8kXw1HswfDEK32BvaKbLD23WbxzXJmZCz2e8jo9yP6lA7eMUNHPrCkwo0oqJ8/e 4uxL7e9jwdp8T61W26z5SebxIDddz6HKgRvgv2BspWhUQl+vBrlgX94nx4iu8B7Q4nrr RuiAtx3AxGrCn8hywlzjew8Es6Hy72v+gw6fHy2wEd3H7X0m6WNzK4HeO+CqZZb3H3f5 WZlScFfHByVe99Xi7jon3hC5D2nY5TizkENEf9vXqwe6tCcDxHg3OxlxZX/Fm9GU8oaS dKdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=DNiXMipqkuH/anRcfopn8XxqISAUbvZjEb9Ku6rCx0A=; b=dR7mqLVYXN90MVVCrKb/dHRfo06Qn747m1doV/Ewu3tqaiR154kgxpC0QwoCLxMqHC hq3NdKj+BzZNekg+tlYOBXT7N29QkRb7nCVHwWqlrUHOsD8G+e1c2czFfqtNGBjlYTGS WfVEbg+r0xoHNrtHwoJV3xLiikT9ZbPDMQyX3GcTDLYk3d5La3yQDTYiWuvPQemZCOOd A9J+k94tHPXKQophpAtbZBDOp/+clvbFzCQDJJEYUyxEjjRWEGjwaubshsgM8YOQu6qR YbN639JPFa3uOrX7dUK8vPMd+XsyE5OnbuzbVM6WS+dYyRdSOPLhQcobGJckljSUptH6 WTAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZeLS648n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si6700661ple.387.2018.11.30.15.49.01; Fri, 30 Nov 2018 15:49:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZeLS648n; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbeLAK7D (ORCPT + 99 others); Sat, 1 Dec 2018 05:59:03 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:35378 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeLAK7C (ORCPT ); Sat, 1 Dec 2018 05:59:02 -0500 Received: by mail-pf1-f196.google.com with SMTP id z9so3551952pfi.2; Fri, 30 Nov 2018 15:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DNiXMipqkuH/anRcfopn8XxqISAUbvZjEb9Ku6rCx0A=; b=ZeLS648n7PDoTv4CN/31oK5h1LPX+aZPSGwD9mC96VTyLO2yq9pyNveFAVz14beil1 fueDRtMVCVuoSImhu35O/Muj29FSM4uHGe6ByeUwTadsPjG+xUpcc9k+iBwOwrYc0LIB Ra0Z7SfUi34PS5Wqjnm7euwgQUmKefATVZ4IFg1W7Tj9GNasW6bPxue/9HhHqanhyayG 1j7fu5ew3wBQqJR3S/rhhYGe3kV96H1FbsjZfslZJlnyHJxgcZPVifqdED3ipFAAotEC l3DD+7W/Nds21wS409N02ShTyTXDE7OZQl3LHefE6gwFF3buYc3tDRY30bQYqkDSNfDu mL2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DNiXMipqkuH/anRcfopn8XxqISAUbvZjEb9Ku6rCx0A=; b=SNUbjOKygs9CBEncHaZ2x6oaB0J/SKJRjEZGhoehGOlqFntuo5B7AmmtchGnk+Lsrc 5BRiYoEKZgV175fsxx8U9dtYSbiWzy22adS52Ocj9mAqKKNAKzi8iXAZOBX4EPqI/WM+ 3AsKq3j1sdeR02H1Vx8RviP9pVpqV4XBpw23I+1dxGIXaZG//EIjU2ErfRLzACQFu+bZ SGvgrgwuvCFVnLWI73uXFLuYXXA7MiWNVzy0oFlZjAhRRvzYOzJTn6ar62fB6sXnjiv0 5IxnT6OsBo2MQ37YUF+lduDOAe7glQa6vtaJs6G4/qvp6dBhFKFlVDl0hBc6WzI6/lhG iQrw== X-Gm-Message-State: AA+aEWa83vkfdmja4MicO1QB38wzgTvS6wWuX47Rom/qzYFttfmYdgCV qqJkLE3w3d98Tq8qr69/NjQ= X-Received: by 2002:a63:fd0a:: with SMTP id d10mr6523559pgh.164.1543621682181; Fri, 30 Nov 2018 15:48:02 -0800 (PST) Received: from castle.tfbnw.net ([2620:10d:c090:180::1:2b61]) by smtp.gmail.com with ESMTPSA id e188sm9556742pfg.130.2018.11.30.15.48.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 15:48:01 -0800 (PST) From: Roman Gushchin X-Google-Original-From: Roman Gushchin To: Tejun Heo , Oleg Nesterov Cc: Dan Carpenter , Mike Rapoport , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Roman Gushchin Subject: [PATCH v4 7/7] cgroup: document cgroup v2 freezer interface Date: Fri, 30 Nov 2018 15:47:45 -0800 Message-Id: <20181130234745.6756-8-guro@fb.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181130234745.6756-1-guro@fb.com> References: <20181130234745.6756-1-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Describe cgroup v2 freezer interface in the cgroup v2 admin guide. Signed-off-by: Roman Gushchin Cc: Tejun Heo Cc: linux-doc@vger.kernel.org Cc: kernel-team@fb.com --- Documentation/admin-guide/cgroup-v2.rst | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 07e06136a550..f8335e26b362 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -864,6 +864,8 @@ All cgroup core files are prefixed with "cgroup." populated 1 if the cgroup or its descendants contains any live processes; otherwise, 0. + frozen + 1 if the cgroup is frozen; otherwise, 0. cgroup.max.descendants A read-write single value files. The default is "max". @@ -897,6 +899,31 @@ All cgroup core files are prefixed with "cgroup." A dying cgroup can consume system resources not exceeding limits, which were active at the moment of cgroup deletion. + cgroup.freeze + A read-write single value file which exists on non-root cgroups. + Allowed values are "0" and "1". The default is "0". + + Writing "1" to the file causes freezing of the cgroup and all + descendant cgroups. This means that all belonging processes will + be stopped and will not run until the cgroup will be explicitly + unfrozen. Freezing of the cgroup may take some time; when this action + is completed, the "frozen" value in the cgroup.events control file + will be updated to "1" and the corresponding notification will be + issued. + + A cgroup can be frozen either by its own settings, or by settings + of any ancestor cgroups. If any of ancestor cgroups is frozen, the + cgroup will remain frozen. + + Processes in the frozen cgroup can be killed by a fatal signal. + They also can enter and leave a frozen cgroup: either by an explicit + move by a user, or if freezing of the cgroup races with fork(). + If a process is moved to a frozen cgroup, it stops. If a process is + moved out of a frozen cgroup, it becomes running. + + Frozen status of a cgroup doesn't affect any cgroup tree operations: + it's possible to delete a frozen (and empty) cgroup, as well as + create new sub-cgroups. Controllers =========== -- 2.17.2