Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751030AbeABV56 (ORCPT + 1 other); Tue, 2 Jan 2018 16:57:58 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:45946 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750726AbeABV5z (ORCPT ); Tue, 2 Jan 2018 16:57:55 -0500 Date: Tue, 2 Jan 2018 21:57:33 +0000 From: Roman Gushchin To: "Michael Kerrisk (man-pages)" CC: Tejun Heo , "Serge E. Hallyn" , lkml , , linux-man Subject: Re: cgroups(7): documenting cgroup.stat Message-ID: <20180102215726.GA2606@castle> References: <196c0cca-b573-8c65-2b5f-66376f79a836@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <196c0cca-b573-8c65-2b5f-66376f79a836@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [2620:10d:c092:180::1:56e2] X-ClientProxiedBy: AM6PR0502CA0023.eurprd05.prod.outlook.com (2603:10a6:209:1::36) To BL2PR15MB1076.namprd15.prod.outlook.com (2603:10b6:201:17::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3c7d85d-0bf5-4503-34af-08d5522bdb79 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:BL2PR15MB1076; X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1076;3:P4cQ/W9IdsKG+QjF7Q7131dFeaQU8huPd/Dob83tbKZ75svQaS4KBE51knnH/Pmao7yaZlvW6Wx4rpvsOO3nxbsRt8ihqO9C711hL258ezWbXmU+4JxwWXoAWPpzDV+q4vh92hgqLLq+IAv/PMSPFjpH/a3HbYCjdyIDTlc6YdK/MvhjWoL66nOHqRQk4/QW9alfGq8kWI5ZBWQG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MVsYONW/ziJVv6APcU4pMqixRwuU8gWEHn/Lac6E/23Sc0rndFNVe1pSPVuoYq3H0Eh7qggzIOecPdNn9vggShq2o7aXq7XYsCeq0t/ITlwccYdEGBqxmDjyvfbNz25jDrSdXeJOIMnyI;4:bgUFLuQU13o37Bmt0jtQEm8qKgrWeisDA46tSNjJO2rbbGpXPzadjA4jNfKSMcZihnURSkScKY/zkC69scm5s7HUvhU+HqHWlgf29aUrUsxkErXTEsfGIYl9T+RjOaMve6YFJpXZJ4pAg9smUZ61iUgqf02pZLK8GOccFifFgGnE2AQbl+d163AmpBnrgq3OG+ylfJKwEBMddH+5lvMaE4gaEs+ZnADEJjcws1qCaMrV4J6LL/2NWsizAEoTDBNRIcgwW27v5wnJHjmVhniROTxu+cIqsKTuAJSpI+9TMSiz9GV+fDiJJsnTfI98BjpZ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(11241501184)(944501075)(93006095)(93001095)(6041268)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:BL2PR15MB1076;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:BL2PR15MB1076; X-Forefront-PRVS: 0540846A1D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(376002)(39860400002)(366004)(396003)(189003)(199004)(24454002)(33896004)(8936002)(86362001)(58126008)(23676004)(52146003)(25786009)(6496006)(2486003)(76176011)(52396003)(33656002)(6916009)(2950100002)(316002)(54906003)(9686003)(55016002)(83506002)(6306002)(81166006)(6666003)(478600001)(52116002)(106356001)(6246003)(386003)(50466002)(97736004)(4326008)(966005)(39060400002)(68736007)(59450400001)(53936002)(229853002)(2906002)(2870700001)(305945005)(8676002)(345774005)(7736002)(1076002)(47776003)(5660300001)(105586002)(81156014)(33716001)(6116002)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR15MB1076;H:castle;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTDJQUjE1TUIxMDc2OzIzOnBoM1A0dWJRYmZQZ0xTOS9iZ3ArcWtCNk9p?= =?utf-8?B?RkNweDVNZlFQZ1NSMnVVMXBOTUNsdEhvMVNNVjRCcnp0NitYZUtjTVhyRFhi?= =?utf-8?B?S1BsazltRjBucDl0NjdPa3c4VThLbDIvN0lpZXA3UmE1R2dmQUEyUWc2RXM4?= =?utf-8?B?amdVTEpuUTg1RTRlVnA5MDZwRXFlaWRBMkNFNXZXbVM0WUNIL0ZpMkZRWEdR?= =?utf-8?B?c1ptVEY4blNsdVFWdXBZNUtGOXJ3Ny9VcmNIRDBYeE82MkxtcGNxRndwNDdX?= =?utf-8?B?SnEvRE5adGpYcmU4N0RYY215ZTBsVFE2aUFKZmNUU1d2a1hDZ2U1UDdWU3VC?= =?utf-8?B?d3lsQk1lVDNnb2NvVnRpelFmVm5rd2t1YUZoOGxqSk9kalY1ZEUzazBjS1c3?= =?utf-8?B?M2pZTHF4aGRmM3poMVRpeEtDeEFsKyt6cENzZEdBYmFiRXdiMW50ckVUTmFh?= =?utf-8?B?TnJUWi96N2NXaUJhR29qcHFrNWluekpKeVJ3eDlDSVR3Tjl4dVpoZVk3YndS?= =?utf-8?B?Qmt2R0FZVEhla2hCQjBJdkdpYzZzUFpnZ2JlakZJWTdCUWMzdUY2eHFneXUz?= =?utf-8?B?czV4cmI0WGZ0VGJvNzRtR0VrNlg2WE1VM1hkaHpDL1p0eCtMZk5RNUpQV3Z2?= =?utf-8?B?S0NjT09oVmFHQWRvemZGNVRQTDJUMVN1NytMV0FEdjZySUZuSHlEUWZyRnUz?= =?utf-8?B?NXIwZVJqV3lBMVBFWm9QMFQwL2FXa1p0Ql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KWtxvv34krPdUXWgj2VzWUcgnwyR2gvFx0IlzLaVzE87WgdQ9vA1rIlQh81XfMIVSCu/eGKMnyR7BQxkR4ZMLC+gSbkQw9ccI77KqHJ5pkmO2NCJNE4yIZM2r1SkluvxCztb93Cc40mjB/rX1V+YClhg5xqII/yMevz3RE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR15MB1076;20:pRXbQk+cPET/biu/MGiglKJpLT02o9+DqOHwrNBo1p7i+lnV3zEfBrEMRKBA1xxbJCcDhYm58OIYRcUbwEE2XnMjlYVyv+Lz4cQwhvzczv5FDpoG+m3WkzBh8V2zclNxZ8NzlG834QLrIPRdfjNExEuv86zKDuVRzgUp3XigXUA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2018 21:57:44.8111 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3c7d85d-0bf5-4503-34af-08d5522bdb79 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR15MB1076 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-02_16:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello, Michael! Thank you for working on this! Please, find my comments below. On Tue, Jan 02, 2018 at 07:22:33PM +0100, Michael Kerrisk (man-pages) wrote: > Hello Roman, > > I wish to add documentation to cgroups(7) for the cgroup.stat file > that you added in Linux 4.14. I wrote some text based on your text > added to the cgroup-v2.txt file, but added some pieces, and also have > a question (see below). The plain-text version for (easy review) > is shown below. Could you please review this text? (Please note > the FIXME!) > > The branch containing the pending cgroups(7) changes can be found at : > https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/log/?h=draft_cgroup_updates > > [[ > Cgroups v2 cgroup.stat file > Each cgroup in the v2 hierarchy contains a read-only > cgroup.stat file (first introduced in Linux 4.14) that consists > of lines containing key-value pairs. The following keys cur‐ > rently appear in this file: > > nr_descendants > This is the total number of visible (i.e., living) > descendant cgroups underneath this cgroup. > > ┌─────────────────────────────────────────────────────┐ > │FIXME │ > ├─────────────────────────────────────────────────────┤ > │For the following text on nr_dying_descendants, it │ > │would I think be helpful to describe a condrete │ > │example of when one might see nr_dying_descendants a │ > │nonzero value for this key. Ideally, the example │ > │would be one that the reader could easily reproduce. │ > │Is there such an example? │ > └─────────────────────────────────────────────────────┘ Hm, basically any cgroup which had some pagecache, associated during the lifetime, will spend some time in the dying state. This means that for most cgroups this number will be non-zero for some amount of time, which depends on global memory pressure. It's also very implementation-defined, and will be likely changed in the following kernel versions. So, I'm not sure, that such an example will be useful for a user. Until this number is huge and constantly growing, it shouldn't be interesting for an user at all. > > nr_dying_descendants > This is the total number of dying descendant cgroups > underneath this cgroup. A cgroup enters the dying state > after being deleted. It remains in that state for an > undefined period (which will depend on system load) > before being destroyed. > > A process can't be made a member of a dying cgroup, and > a dying cgroup can't be brought back to life. So, maybe it worth it to add a statement, that some amount of dying cgroups is normal and it's not a signal of any problem? Otherwise looks very good to me. Thank you! Roman