From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [RFC] cgroup TODOs Date: Mon, 17 Sep 2012 12:40:28 +0400 Message-ID: <5056E1FC.1090508@parallels.com> References: <20120913205827.GO7677@google.com> <20120914180754.GF6221@redhat.com> <20120914185324.GI17747@google.com> <20120914192840.GG6221@redhat.com> <20120914194439.GP17747@google.com> <20120914194950.GQ17747@google.com> <20120914203925.GR17747@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120914203925.GR17747-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: Neil Horman , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Serge Hallyn , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Hocko , Paul Mackerras , "Aneesh Kumar K.V" , Arnaldo Carvalho de Melo , Johannes Weiner , Thomas Graf , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Paul Turner , Ingo Molnar , Vivek Goyal List-Id: containers.vger.kernel.org On 09/15/2012 12:39 AM, Tejun Heo wrote: > Hello, again. > > On Fri, Sep 14, 2012 at 12:49:50PM -0700, Tejun Heo wrote: >> That said, if someone can think of a better solution, I'm all ears. >> One thing that *has* to be maintained is that it should be able to tag >> a resource in such way that its associated controllers are >> identifiable regardless of which task is looking at it. > > So, I thought about it more. How about we do "consider / ignore this > node" instead of "(don't) nest beyond this level". For example, let's > assume a tree like the following. > > R > / | \ > A B C > / \ > AA AB > > If we want to differentiate between AA and AB, we'll have to consider > the whole tree with the previous sheme - A needs to nest, so R needs > to nest and we end up with the whole tree. Instead, if we have honor > / ignore this node. We can set the honor bit on A, AA and AB and see > the tree as > > R > / > A > / \ > AA AB > > We still see the intermediate A node but can ignore the other > branches. Implementation and concept-wise, it's fairly simple too. > For any given node and controller, you travel upwards until you meet a > node which has the controller enabled and that's the cgroup the > controller considers. > > Thanks. > That is exactly what I proposed in our previous discussions around memcg, with files like "available_controllers" , "current_controllers". Name chosen to match what other subsystems already do. if memcg is not in "available_controllers" for a node, it cannot be seen by anyone bellow that level.