From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753416AbdFVU1S convert rfc822-to-8bit (ORCPT ); Thu, 22 Jun 2017 16:27:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39917 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdFVU1R (ORCPT ); Thu, 22 Jun 2017 16:27:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 48FE47A17D Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=longman@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 48FE47A17D Subject: Re: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode To: Tejun Heo Cc: Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de, torvalds@linux-foundation.org References: <1497452737-11125-1-git-send-email-longman@redhat.com> <1497452737-11125-5-git-send-email-longman@redhat.com> <20170621213807.GC14720@htj.duckdns.org> From: Waiman Long Organization: Red Hat Message-ID: <7e59ea28-76df-9c9f-02f5-e2847216f1dc@redhat.com> Date: Thu, 22 Jun 2017 16:27:14 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170621213807.GC14720@htj.duckdns.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 22 Jun 2017 20:27:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2017 05:38 PM, Tejun Heo wrote: > Hello, Waiman. > > On Wed, Jun 14, 2017 at 11:05:35AM -0400, Waiman Long wrote: >> Subtree root mode is a new cgroup mode which applies the following >> restrictions when turned on: >> >> 1) Controllers are only allowed to be passed to the children in >> bypass mode except those with the "enable_on_root" flag on. >> 2) Only 1 child cgroup is allowed. >> >> That lone child can be used as the pseudo root of a container cgroup >> hierarchy. All the resources, if controlled, are in the parent >> cgroup. There will be no control knobs in the child. That makes it >> look and feel like a root. > I'm not sure not having the control files in the child makes that much > difference. It is more a look and feel thing than being useful. The sole purpose is to make the container root looks like a real root as much as possible. >> That pseudo root is also considered to be mixable and so can become >> root of a mixed threaded subtree. The no internal process constraint >> also does not apply. > Heh, you can't just declare a non-root cgroup to be a mixed root but > if you're special casing this and making the kernel play a masquerade > with special node, you can make cgroup provide a mixed root while > hosting the internal processes in a dedicated leaf cgroup which isn't > visible to the nested root, right? That is true. > It's all a game of masquerading tho and doesn't actually enable > anything which isn't possible now. This would definitely be useful > for testing. You are right about that. As mentioned in another email, having bypass mode in subtree_control is useful, I think. The concept of subtree root mode, however, is more toward satisfying PeterZ's idea of container invariant. I won't mind leaving it out if others have no objection to that. Cheers, Longman