From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932625AbdEXR4G (ORCPT ); Wed, 24 May 2017 13:56:06 -0400 Received: from mail-yb0-f172.google.com ([209.85.213.172]:35049 "EHLO mail-yb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932397AbdEXR4D (ORCPT ); Wed, 24 May 2017 13:56:03 -0400 Date: Wed, 24 May 2017 13:56:00 -0400 From: Tejun Heo To: Waiman Long Cc: Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de Subject: Re: [RFC PATCH v2 13/17] cgroup: Allow fine-grained controllers control in cgroup v2 Message-ID: <20170524175600.GL24798@htj.duckdns.org> References: <1494855256-12558-1-git-send-email-longman@redhat.com> <1494855256-12558-14-git-send-email-longman@redhat.com> <20170519205550.GD15279@wtj.duckdns.org> <6fe07727-e611-bfcd-8382-593a51bb4888@redhat.com> <20170524173144.GI24798@htj.duckdns.org> <29bc746d-f89b-3385-fd5c-314bcd22f9f7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29bc746d-f89b-3385-fd5c-314bcd22f9f7@redhat.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, May 24, 2017 at 01:49:46PM -0400, Waiman Long wrote: > What I am saying is as follows: > / A > P - B > \ C > > # echo +memory > P/cgroups.subtree_control > # echo -memory > P/A/cgroup.controllers > # echo "#memory" > P/B/cgroup.controllers > > The parent grants the memory controller to its children - A, B and C. > Child A has the memory controller explicitly disabled. Child B has the > memory controller in pass-through mode, while child C has the memory > controller enabled by default. "echo +memory > cgroup.controllers" is > not allowed. There are 2 possible choices with regard to the '-' or '#' > prefixes. We can allow them before the grant from the parent or only > after that. In the former case, the state remains dormant until after > the grant from the parent. Ah, I see, you want cgroup.controllers to be able to mask available controllers by the parent. Can you expand your example with further nesting and how #memory on cgroup.controllers would affect the nested descendant? Thanks. -- tejun