[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7804658e-7644-8edb-5ca8-0c97389c8c62@huawei.com>
Date: Fri, 15 Jan 2021 09:55:43 +0800
From: chenzhou <chenzhou10@...wei.com>
To: Michal Koutný <mkoutny@...e.com>
CC: <tj@...nel.org>, <lizefan.x@...edance.com>, <hannes@...xchg.org>,
<cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] cgroup-v1: add disabled controller check in
cgroup1_parse_param()
On 2021/1/15 0:54, Michal Koutný wrote:
> On Thu, Jan 14, 2021 at 10:08:19PM +0800, chenzhou <chenzhou10@...wei.com> wrote:
>> 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.
> But even then, the line
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/cgroup/cgroup-v1.c?h=v5.11-rc3#n1012
> would select only 'enabled' controllers, wouldn't it?
Yeah, this will select all enabled controllers, but which doesn't the behavior we want.
I think the case should return error with information "Disabled controller xx" rather than
attaching all the other enabled controllers.
For example, boot with cgroup_no_v1=cpu, and then mount with
"mount -t cgroup -o cpu cpu /sys/fs/cgroup/cpu", then all enabled controllers will
be attached expect cpu.
>
> It's possible I missed something but if this means that cgroup_no_v1=
> doesn't hold to its expectations, I'd suggest adding proper Fixes: tag
> to the patch.
See above. Just the mount behavior isn't what we what.
The behavior was changed since commit f5dfb5315d34 ("cgroup: take options parsing into ->parse_monolithic()"),
will add this as Fixes.
Thanks,
Chen Zhou
>
> Thanks,
> Michal
Powered by blists - more mailing lists