Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752389AbeACN7p (ORCPT + 1 other); Wed, 3 Jan 2018 08:59:45 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:36114 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752096AbeACN7Y (ORCPT ); Wed, 3 Jan 2018 08:59:24 -0500 Date: Wed, 3 Jan 2018 13:59:04 +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: <20180103135858.GA15200@castle.DHCP.thefacebook.com> References: <196c0cca-b573-8c65-2b5f-66376f79a836@gmail.com> <20180102215726.GA2606@castle> <7cfbf94e-71c8-b49e-7483-79c3fa363191@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <7cfbf94e-71c8-b49e-7483-79c3fa363191@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [2620:10d:c092:200::1:a0f9] X-ClientProxiedBy: DB6PR0201CA0024.eurprd02.prod.outlook.com (2603:10a6:4:3f::34) To SN2PR15MB1086.namprd15.prod.outlook.com (2603:10b6:804:22::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05d1e2ff-3720-4c0e-6d93-08d552b22dc0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:SN2PR15MB1086; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1086;3:qDaSfRGZe+XIbZm2sTmbrbcLsvFx4aRjL2AKV2FCCvw5AhRAXpixA34akyEl55L1Kd2Xzf5c2CizOGjftawZE3cbk5bw4oGbWcbPeDxLvft9U5w8iA0lJdQQMGQDNlXKgsU67847EGodY8Q9Qu+blTgr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Xk7YJWqJS/4TSq7bfDXjauIl0gxkNCVcsWk/oIwssW0Wzcb49LJQW2x4pRK2gpddp8yWX9PZAKsb7/Qk1QIAdM0dHxYCeOIS5NG7rRnoxGLYLGSu4NmonPGSe0575zuS49WW22HrahQjdjNJ9FB+SyrKic8zCLVxUI4qZsP0pLEYexpqTT5RekZFkxcO5mIkbty954vTUeOKPFgi;4:SRcFxPq5lfcsUwmpvCzqKL7XAkzZ8QZ8CDdX6fRbJB4oWtUMsL5rEDGyKvMwXTyRj0f6f6gxBhjyTLy22f7Az38YH1jN6s9tLvj2m4NTbNPwCu1GOVEoo8hmddi5NPns4JEPeyouHVZ/6VMNbc1NdQWvEMOiqNDLgd3Fq4NsWuWoaE5xbmltTZLhECEbVGjgom9gTYC2HDqZzYQyNtgrNHQ4BobqbOvvlLvMH6pWrsXewOuN2D3QPeUGCCbsOw/g0EDnWgGxeayjsrUlK9l2eczVm5X8z+UjUQJVxFg+E4/Yy9nQZJrvP5/eHyuJc7Oa X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(11241501184)(944501075)(3002001)(6041268)(20161123564045)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:SN2PR15MB1086;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN2PR15MB1086; X-Forefront-PRVS: 0541031FF6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39860400002)(366004)(376002)(346002)(396003)(39380400002)(189003)(199004)(83506002)(6506007)(386003)(76176011)(52396003)(7696005)(52116002)(16586007)(478600001)(316002)(58126008)(54906003)(6666003)(6916009)(2950100002)(4326008)(229853002)(2906002)(25786009)(53936002)(6246003)(6116002)(1076002)(5660300001)(39060400002)(105586002)(23726003)(86362001)(9686003)(55016002)(106356001)(50466002)(97736004)(8676002)(7736002)(8936002)(305945005)(81166006)(81156014)(68736007)(33656002)(47776003)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB1086;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR15MB1086;23:UORZvmyMIIKwARNaaG+sUNYVOYYVglSi9dfy9T62b?= =?us-ascii?Q?yRKeF9biiI7VOVbGDSeFhVeWm7zQWiazkRVB9Du79JemFN7lpyD13q0A/i6u?= =?us-ascii?Q?l/GrrdkxTOXFG/59EfuVLpAcPjP6WmlXH1JIghMn+cau1xCu5b405grSTROB?= =?us-ascii?Q?jSp7hMx4+cl/UHyDr5hMOgJUUA4Jy54R5dZ5UIAT78C0P5AcEByrS0n+n9Ns?= =?us-ascii?Q?1iGokuZTrZdA1bBPkHQ6yuPjLRdViaw94m7cxYxgwtPUhpgP41249IE0Agsl?= =?us-ascii?Q?Vp0Z0d568S1ysztMLtJgcT2BBtRlSmxRERkJszGDVeSr6mLEZYFWI5UHN+g3?= =?us-ascii?Q?C7rQhW3cEP5lXaTYGI7PZrpjwM/iUiLN5rS1PRQYe//hN8laUn63fyGBDDtg?= =?us-ascii?Q?nv6q/5JytNBivk6nR5IgZXtz7eXSXy3pCGcRIHjprSDnrlqQhWy1DMlOOPFT?= =?us-ascii?Q?EJbyzJo1crE7+GN2pqNwheQVotzwsftmn6mhPIOJ6RFZWnhvqUIrl57rawMO?= =?us-ascii?Q?3xKKopNcn+8hiV1vPQ4y8cCOLqECQ67uFwrQpzmDOYWEqwRpEi+VZBslpsUP?= =?us-ascii?Q?g5tDd0TZ4JZIX38bH5eiylqV23aRLdPVCc1L2lyaVeecFP64TeUFhXOmHAGj?= =?us-ascii?Q?f74OUCx8PlSFom2HIm/zC/KJyGyAreEUJMPDxpq+Xz9BDMGN+Hz+7bNN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mn2YPs6nH+4HJDVV3CFOJE4Pv8FbsHUIced5CRoGp5fSrG96Ht7f+b2dW+M8aKadANMt6OIAaL2WZiEzHW8guDuSARSuDR3CuuqnHmamPKdSxGE8mvJ5X9i2z8Tnm1xr1QvF6Xh4sRGTq1o=;24:GmflcNLx9++GdMHH4lI7suIG4GJPhdyQSqD4XB1WXTxT4omVFkPgTEGgaFyvPsW0xmaUN5oEwYnq7ToKgI9GCB5FPXJzmR4sevGCnWCkGlE=;7:H8OfrYSSd88WL3/mEy/SYG6DMafJ6G+WcEXtWbC+UMmsigx7fbPa5Vti4DAQiaDmguo0HAZRqlomN0yBtWCU8vJenwI6xbCpteB3hQXyB0yWkO8zdRRvK3XUVS3N+ineO5+UliW41zmqRJsBElYwkHDKtvVntjpRK057k4Hhiku9VuxC6H/JzTrJoUr2anUplXSmECKC0sxdeVd6/lAk5qiWblvB06cgItCeXERn5sLT++qqmu4xLo2OYGVutFUi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1086;20:gTta5QelLDruYZM6D2Gi7LYtbJEfrIwLuQA07PjHFJArU6n+IoWW+lkGiKZJqcMWgrQMlPxPeZ/GwQRvO2Ck58707WDZMWjouFbByz/Jwi2oi3AmcJCiV+dcfSA3dWaAatutITGczYokEoYifgn79STi6YreDAFsbSr31kddtwc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2018 13:59:15.7253 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05d1e2ff-3720-4c0e-6d93-08d552b22dc0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB1086 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-03_10:,, 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! > > 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. > > Fair enough. I added some vague text about resources needing to be freed > before the cgroup is destroyed. See below. > > > >> 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? > > Okay, I added some text along those lines. The first paragraph now reads: > > 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) > while resources are freed before the cgroup is > destroyed. Note that the presence of some cgroups in > the dying state is normal, and is not indicative of any > problem. Looks good to me! Reviewed-by: Roman Gushchin Thank you!