Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934426AbeAJMow (ORCPT + 1 other); Wed, 10 Jan 2018 07:44:52 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51020 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932548AbeAJMor (ORCPT ); Wed, 10 Jan 2018 07:44:47 -0500 Date: Wed, 10 Jan 2018 04:44:14 -0800 From: Roman Gushchin To: "Michael Kerrisk (man-pages)" CC: "Serge E. Hallyn" , Tejun Heo , linux-man , lkml , "open list:CONTROL GROUP (CGROUP)" Subject: Re: cgroups(7): documenting /sys/kernel/cgroup files Message-ID: <20180110124407.GA26913@castle.DHCP.thefacebook.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [2620:10d:c092:200::1:327a] X-ClientProxiedBy: HE1PR09CA0048.eurprd09.prod.outlook.com (2603:10a6:7:3c::16) To CO1PR15MB1080.namprd15.prod.outlook.com (2a01:111:e400:7b66::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e888073-727a-46b4-5b08-08d55827e538 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CO1PR15MB1080; X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;3:IWcePQnJQYYP19d37KTZXQ/b1aEql/sLzPsf9plIR9Ztl17i8Ylj5IODKcYG+Dzeo+Qq2oyU7EpsOVjoh2qqTIsw6HheoZFHvVIJJXVyIiLzdEDyQfhbxpUcg/DEuFA67uIWwbvjvDhwmP/9QnpKq5Fw5TyclKjd9T4BNlhj7qzbCDaitY1OJOLvoSYDRajQZhAoKIXb0F9PtHOZYZvi6gNvOVobquoYcsAsmWKe5F84sxwt6UFEEQrTxoLP3bIt;25:zpk8Sj1ZGOYUJtEZHItep3caHYSjlFCPUSBinkLicH+YXVxIuI4/0eNGWdh4hEG7zeqiitxCKIHuoe/InPV7kdCgNsmqIpC52egExqk+fWBr+dOev0tQLY/OvoWHpm7W05aGFeBYNvqU2BX9eMI4qNQG89YawZLfVqEDGbkM1Ei02AkF9Oce2HTIdxnpO37f1cnVluNrzgdWurHu3uq/rz9DPCkFrlXUFPZ3LoY0bunuS+OwHHJe35wOYNtb8bmGM//eAGQpM9+chck3ro2ka7oh3jaSyPS14ccA6o8GiUTMDYQsXu6Y4b+BfzwtC2DzRsU/RloO3cJLgTh2ViNDkw==;31:Icg/7dEjD+rs2OMSyuSJNo1npK0FTjwVZukGqnmwmE2HxtZRGK8V6L/SfJli68D7EmubQU+x5kPLY47FY3XFy5FrQpR7kR3O7juGjR/cFR4dAyzDLDmExgV/1/W9egkVaA/ILpWSzxCh62ZRYjWrVNDgmk4ruhEeHh6nozm6AZANDTIQ1jSeuFnxUhO380NoDkIcHTI63HKHtoHKJ/WIsCwmSYiIEz40ASaaRMHKG6U= X-MS-TrafficTypeDiagnostic: CO1PR15MB1080: X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;20:adjX1NsCl9tjT086GJNDukziJXrIE1x/s7LidOkruK/0xQG99aAVjQ/G0GROvSr3Vw/AfoL4Xi96L78qx5hYKfj9/Sj3TEmsirtl+R0h1jbpYewA4accIr9PcToRCuSYId5f94luarUT8Tw3u+xpXZruMIullsdenr3km9F45yCv3zcuJIoN/1LGsSWsnsxGIpzzqocWrqHfWEX9xEE+wGRjICFy4fg5QLbozSxDw4YtWEh12QfafcsgWoZob8IgWYhZca26cDYKkmTXKCSNP0tNWdXu5flnLJuyAlhBS46mxvchEUyGyVs9GP2bnEVm5/fYAYNZXXsr73BvM88sERZWnHGRpUyjccg+FDpalURIlIyRlUmp0GKQkxORkV/8LHqFq9BxLW4sZJtzikCOfDtp3bpgQNqh7L9R7rE7E5a2fniasffJjrZVpncFw1/4vG3eG1Pg3zEJ4SnXxI0L3bKixrL0KdZaOnXjl5UPmOVBWJ3XWZiiE0DJXLxgRQdV;4:bIDIkPBeOsJV/ZeJuIiGnNubjD82bPRkX3jJ1NjFmuLBMWJv0PzwEoCAyDPGUI1PhdS/cPhuaz26EpylKSqBx6T3qoor1Bp7SyEMGtR9yI2mdRxvDu+35WG6r7B0onJtzNKOasuX3PWG/5/UmYcNvUlmzJNcvBiSg8AvN5sF+H/wFRBGG8wlOKln+mMp70EVDCObDk1pQLyDB8ADrnJCsGf2tvVx8XviId/upXGnbDVIBdTIbMuawrsrdVTDjtCtbLCgfaXYW1h0YobjIr/gL/pZ53P+SZdq+eJ5/8gW2n9QYZUjExVBJ+BA+oPb//OKRUk2ffNy9X0vmK4T2HXqt5cQ4SuVdAY11GV0QJSCoHCTkmf9a0L2F6yfCCSJonVotLPCfOOxifuG9fESYfz9VmAhGStBX8kMsElCFWs7H/Q= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(278428928389397)(85827821059158)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(11241501184)(944501075)(10201501046)(3002001)(93006095)(93001095)(6041268)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:CO1PR15MB1080;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CO1PR15MB1080; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(366004)(346002)(396003)(376002)(39380400002)(39860400002)(189003)(24454002)(199004)(39060400002)(81166006)(106356001)(50466002)(76176011)(25786009)(7696005)(52116002)(6506007)(47776003)(6246003)(52396003)(53546011)(105586002)(2906002)(33656002)(8936002)(68736007)(386003)(4326008)(53936002)(6666003)(54906003)(81156014)(8676002)(5660300001)(9686003)(7736002)(58126008)(23726003)(97736004)(86362001)(6916009)(478600001)(6116002)(2950100002)(16586007)(316002)(229853002)(305945005)(1076002)(83506002)(55016002)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR15MB1080;H:castle.DHCP.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO1PR15MB1080;23:g1dTwfax9T194DqdIM1IaqzJuihbd4F9q8nmbH6Hl?= =?us-ascii?Q?dovjbl/DXQQxAcbzDEUuOSgJn3gQEDCU474ilto4PikSxw+uh9kATr7mXYQj?= =?us-ascii?Q?D1NAY9NNQAhGbPx/FmlRT7rAT7CjUOXmnTZP8OadUaasGNB1i4sDB8MsLMwy?= =?us-ascii?Q?TxQmdaBGTGCJBhVgk5TlBXady+oEL1knWlU7FSxM/ZQnXYjvlz2BXfg+RUoX?= =?us-ascii?Q?KcxMC9uk9Qa14YsPsJd1TxwFtQejfFLV2xxAaiJvS0swh4razpHaooaqHoDq?= =?us-ascii?Q?z0BBQnVQtsIKRqOXAYI8m/PynOk4zkOz32mnK9a4UUwsm6QuTOj12JX7twqN?= =?us-ascii?Q?XhIn0PdgOik4pSEDu/p/E0aUmADUDZQE0YyI/TOSW57uj6dNv/T6etnLXjKT?= =?us-ascii?Q?KsVgN29/Rk9Y2PEauMx9J1/nLsIBY1P1iYAmEcKxQWjVErht2x3FUojhGTYp?= =?us-ascii?Q?8MHOwBTgVPEBiK3Hzdxv0pRpFtZ6K6hU0jmJmxMFBR1cQ3UF89PXHneqa+sS?= =?us-ascii?Q?8BQRgllXok0GV5Z8+63czxro4Av0ndPddMn7Wk7ITIhG1pd5jdBjlGttVCvK?= =?us-ascii?Q?onf0+W5c1Gl21ACzv+IpIpAAa6tLIW83VEewFDkwT6il0dRDsSCnkNn19/35?= =?us-ascii?Q?FajVQWV5ssLfdMaBKPTLvJDWJ6/l+gabB86ODGMBzxdNXkNUMUFMn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KbzuJd4TImtAyx6GEp01g7rYW/Fba6u7GBUdL24yae4z3uJVxk=;5:rIWUodB2g92Aj3MmkCTzeyTdc512jrBkaZMk7qtqgZkeKQ6bPvgh/dDajldIVlxbUupcy+ekWmIbCgZpkaM3lCji+u/D2kzlEizYz7I3pY8JzWsUqP3U6QAzc3Nf+Peys/VfJnXoktu+r6TaED855N1jO1DN3lIYVJqfQVpNHJQ=;24:i54I0KTMq1GG4jWPF5x1R2eYGjK2Sxk9DE0ZtvlKG5NgJqarCBaqLMQZeJVusmuqhhz+lELV7lpttbnGR8UzwGGpK0c4efy/psuvDFv37ps=;7:lOAlpSUn4/XJTbusQ/xJkN2y3Za5Ur96lo4vURI1Kd9rAgz2DvIg2gI/UJPWF6EXI5k7ky/dveda+OAFFRAkmGJnbYnCB4IwXAf8v441MX9+7N0IxiPCYTI3ZG5BhJV7JbFEdk3BXJ7Jsh/cXgdrX3QcERwDtb4j0X5CJ+r80eWIA4456+uGvLQYj1GY2SCqWyS+78Lb/T7HVWsC2Skvck7/+TYAMd0jZwRHfLshgzjkruZ3SIruYprjjwSDjb40 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1080;20:zYMcdAgDuHm3YONYjvkSN2W/GQJ2D/zYANnyJnQiPdEFZrwDP4F7SdUUNu3d78Vyi+DLfat+DqzbGz60lqVgwg9VXAutwuR/R+6CvPGyFz8EZWCvAfxoHU8R2J9/a8G7xPXKX5ngEotrXjQBEnQVA7xZKUtdgK3UodrFwS/3t20= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 12:44:29.3718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e888073-727a-46b4-5b08-08d55827e538 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB1080 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-10_07:,, 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, On Wed, Jan 10, 2018 at 05:23:32AM +0100, Michael Kerrisk (man-pages) wrote: > Hello Roman, > > On 8 January 2018 at 22:11, Michael Kerrisk (man-pages) > wrote: > > Hello Roman, > > > > I wrote cgroups(7) text below to document the files added by you in > > Linux 4.15. Could you let me know if the following text is okay please: > > > > /sys/kernel/cgroup files > > /sys/kernel/cgroup/delegate (since Linux 4.15) > > This file exports a list of the cgroups v2 files (one per > > line) that are delegatable (i.e., whose ownership should be > > changed to the user ID of the delegatee). In the future, > > the set of delegatable files may change or grow, and this > > file provides a way for the kernel to inform user-space > > applications of which files must be delegated. As at Linux > > 4.15, one sees the following when inspecting this file: > > > > $ cat /sys/kernel/cgroup/delegate > > cgroup.procs > > cgroup.subtree_control > > I have a question about /sys/kernel/cgroup/delegate: why does this > file not list cgroup.threads, since that is also a file that > (potentially) should be delegated? cc Tejun cgroup.threads is not listed because it's not delegatable (doesn't have CFTYPE_NS_DELEGATABLE flag set). I don't know if it was intended or just an accident (I believe the latter). Thanks! PS In the latter case the following patch should fix it: >From fdf19edb6e9594e48e89d4510767b9eb6ca2d9dd Mon Sep 17 00:00:00 2001 From: Roman Gushchin Date: Wed, 10 Jan 2018 04:35:12 -0800 Subject: [PATCH] cgroup: make cgroup.threads delegatable Make cgroup.threads file delegatable. The behavior of cgroup.threads should follow the behavior of cgroup.procs. Signed-off-by: Roman Gushchin Discovered-by: Michael Kerrisk Cc: Tejun Heo --- kernel/cgroup/cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 0b1ffe147f24..b74d9ee1425c 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -4449,6 +4449,7 @@ static struct cftype cgroup_base_files[] = { }, { .name = "cgroup.threads", + .flags = CFTYPE_NS_DELEGATABLE, .release = cgroup_procs_release, .seq_start = cgroup_threads_start, .seq_next = cgroup_procs_next, -- 2.14.3