linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: lizefan@huawei.com, containers@lists.linux-foundation.org,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHSET cgroup/for-3.15] cgroup: implement unified hierarchy
Date: Mon, 14 Apr 2014 11:45:56 -0400	[thread overview]
Message-ID: <20140414154556.GA9552@redhat.com> (raw)
In-Reply-To: <1395974461-12735-1-git-send-email-tj@kernel.org>

On Thu, Mar 27, 2014 at 10:40:49PM -0400, Tejun Heo wrote:

[..]
> This patchset finally implements the default unified hierarchy.  The
> goal is providing enough flexibility while enforcing stricter common
> structure where appropriate to address the above listed issues.
> 
> Controllers which aren't bound to other hierarchies are
> automatically attached to the unified hierarchy,

Hi Tejun,

So this patchset does not *enforce* a single hierarchy? So user space
can still mount other hierarchies.

> which is different in
> that controllers are enabled explicitly for each subtree.
> "cgroup.subtree_control" controls which controllers are enabled on the
> child cgroups.  Let's assume a hierarchy like the following.
> 
>   root - A - B - C
>                \ D
> 
> root's "cgroup.subtree_control" determines which controllers are
> enabled on A.  A's on B.  B's on C and D.  This coincides with the
> fact that controllers on the immediate sub-level are used to
> distribute the resources of the parent.  In fact, it's natural to
> assume that resource control knobs of a child belong to its parent.
> Enabling a controller in "cgroup.subtree_control" declares that
> distribution of the respective resources of the cgroup will be
> controlled.  Note that this means that controller enable states are
> shared among siblings.
> 
> The default hierarchy has an extra restriction - only cgroups which
> don't contain any task may have controllers enabled in
> "cgroup.subtree_control".  Combined with the other properties of the
> default hierarchy, this guarantees that, from the view point of
> controllers, tasks are only on the leaf cgroups.  In other words, only
> leaf csses may contain tasks.  This rules out situations where child
> cgroups compete against internal tasks of the parent.

How does this work for root's tasks now? Given that task can only be
in leaf cgroups, that means tasks can't be in / cgroup (If one wants
to create some cgroups). Does that mean / will be empty and init system
need to setup things right.

Before one can create child cgroups, there will be some processes
already running (init itlsef, kernel threads etc). I am assuming they
will be running in /. So how would that work.

Thanks
Vivek

  parent reply	other threads:[~2014-04-14 15:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28  2:40 [PATCHSET cgroup/for-3.15] cgroup: implement unified hierarchy Tejun Heo
2014-03-28  2:40 ` [PATCH 01/12] cgroup: update cgroup->subsys_mask to ->child_subsys_mask and restore cgroup_root->subsys_mask Tejun Heo
2014-03-28  2:40 ` [PATCH 02/12] cgroup: introduce effective cgroup_subsys_state Tejun Heo
2014-03-28  2:40 ` [PATCH 03/12] cgroup: implement cgroup->e_csets[] Tejun Heo
2014-03-28  2:40 ` [PATCH 04/12] cgroup: make css_next_child() skip missing csses Tejun Heo
2014-03-28  2:40 ` [PATCH 05/12] cgroup: reorganize css_task_iter Tejun Heo
2014-03-28  2:40 ` [PATCH 06/12] cgroup: teach css_task_iter about effective csses Tejun Heo
2014-03-28  2:40 ` [PATCH 07/12] cgroup: cgroup->subsys[] should be cleared after the css is offlined Tejun Heo
2014-03-28  2:40 ` [PATCH 08/12] cgroup: allow cgroup creation and suppress automatic css creation in the unified hierarchy Tejun Heo
2014-03-28  2:40 ` [PATCH 09/12] cgroup: add css_set->dfl_cgrp Tejun Heo
2014-03-28  2:40 ` [PATCH 10/12] cgroup: update subsystem rebind restrictions Tejun Heo
2014-03-28  2:41 ` [PATCH 11/12] cgroup: prepare migration path for unified hierarchy Tejun Heo
2014-03-28  2:41 ` [PATCH 12/12] cgroup: implement dynamic subtree controller enable/disable on the default hierarchy Tejun Heo
2014-04-14 15:45 ` Vivek Goyal [this message]
2014-04-14 17:52   ` [PATCHSET cgroup/for-3.15] cgroup: implement unified hierarchy Tejun Heo
2014-04-14 18:14     ` Vivek Goyal
2014-04-14 19:21       ` Tejun Heo
2014-04-15  2:58         ` Li Zefan
2014-04-15  4:57           ` Tejun Heo
2014-04-30 10:57     ` Raghavendra KT
2014-05-02 15:12       ` Tejun Heo
2014-05-05 16:37         ` Raghavendra KT
2014-04-14 21:31 ` Tejun Heo
2014-04-15 22:05 ` [PATCH 0.5/12] cgroup: cgroup_apply_cftypes() shouldn't skip the default hierarhcy Tejun Heo
2014-04-15 22:05   ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140414154556.GA9552@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).