From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AD92C433DB for ; Thu, 14 Jan 2021 14:10:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25FA723A05 for ; Thu, 14 Jan 2021 14:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728183AbhANOKR (ORCPT ); Thu, 14 Jan 2021 09:10:17 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:10968 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbhANOKR (ORCPT ); Thu, 14 Jan 2021 09:10:17 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DGmNP1M54zhwcc; Thu, 14 Jan 2021 22:07:33 +0800 (CST) Received: from [10.174.176.61] (10.174.176.61) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 14 Jan 2021 22:08:20 +0800 Subject: Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param() To: =?UTF-8?Q?Michal_Koutn=c3=bd?= References: <20201218061755.121205-1-chenzhou10@huawei.com> CC: , , , , From: chenzhou Message-ID: Date: Thu, 14 Jan 2021 22:08:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.61] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On 2021/1/14 21:12, Michal Koutný wrote: > Hello Chen. > > On Fri, Dec 18, 2020 at 02:17:55PM +0800, Chen Zhou wrote: >> When mounting a cgroup hierarchy with disabled controller in cgroup v1, >> all available controllers will be attached. > Not sure if I understand the situation -- have you observed a v1 > controller attached to a hierarchy while specifying cgroup_no_v1= kernel > cmdline arg? Yeah, this is the situation. In this case, at the beginning of function check_cgroupfs_options(), the mask ctx->subsys_mask will be 0. And if we mount without 'none' and 'name=' options, then in check_cgroupfs_options(), the flag ctx->all_ss will be set, that is, select all the subsystems. Thanks, Chen Zhou > > AFAICS, the disabled controllers are honored thanks to > check_cgroupfs_options(). > > Michal