Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-15 Thread chenzhou
Hi Michal, On 2021/1/15 18:08, Michal Koutný wrote: > On Fri, Jan 15, 2021 at 09:55:43AM +0800, chenzhou > wrote: >> Yeah, this will select all enabled controllers, but which doesn't the >> behavior we want. > I see what the issue is now. > >> See above. Just the mount behavior isn't what we

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-15 Thread Michal Koutný
On Fri, Jan 15, 2021 at 09:55:43AM +0800, chenzhou wrote: > Yeah, this will select all enabled controllers, but which doesn't the > behavior we want. I see what the issue is now. > See above. Just the mount behavior isn't what we what. I agree this a bug and your I find your approach correct

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread chenzhou
On 2021/1/15 11:17, Tejun Heo wrote: > Hello, > > On Fri, Jan 15, 2021 at 09:55:43AM +0800, chenzhou wrote: >> 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

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread Tejun Heo
Hello, On Fri, Jan 15, 2021 at 09:55:43AM +0800, chenzhou wrote: > 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

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread chenzhou
On 2021/1/15 0:54, Michal Koutný wrote: > On Thu, Jan 14, 2021 at 10:08:19PM +0800, chenzhou > 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

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread Michal Koutný
On Thu, Jan 14, 2021 at 10:08:19PM +0800, chenzhou 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,

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread chenzhou
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

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2021-01-14 Thread Michal Koutný
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

Re: [PATCH v2] cgroup-v1: add disabled controller check in cgroup1_parse_param()

2020-12-17 Thread Zefan Li
On 2020/12/18 14:17, Chen Zhou wrote: > When mounting a cgroup hierarchy with disabled controller in cgroup v1, > all available controllers will be attached. > > Add disabled controller check in cgroup1_parse_param() and return directly > if the specified controller is disabled. > >