linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Witold Krecicki <wpk@culm.net>
To: Paul Menage <paul@paulmenage.org>, Li Zefan <lizf@cn.fujitsu.com>,
	containers@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Witold Krecicki <wpk@culm.net>
Subject: [PATCH 6/6] cgroup: documentation of isolation_root cgroup flag
Date: Fri, 30 Sep 2011 13:36:25 +0200	[thread overview]
Message-ID: <1317382585-12172-7-git-send-email-wpk@culm.net> (raw)
In-Reply-To: <1317382585-12172-1-git-send-email-wpk@culm.net>

Documentation of isolation_root cgroup flag.

Signed-off-by: Witold Krecicki <wpk@culm.net>
---
 Documentation/cgroups/cgroups.txt |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index cd67e90..66880a6 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -19,7 +19,8 @@ CONTENTS:
   1.3 How are cgroups implemented ?
   1.4 What does notify_on_release do ?
   1.5 What does clone_children do ?
-  1.6 How do I use cgroups ?
+  1.6 What does isolation_root do ?
+  1.7 How do I use cgroups ?
 2. Usage Examples and Syntax
   2.1 Basic Usage
   2.2 Attaching processes
@@ -304,7 +305,22 @@ subsystem of the newly created cgroup. Usually when this callback is
 implemented for a subsystem, it copies the values of the parent
 subsystem, this is the case for the cpuset.
 
-1.6 How do I use cgroups ?
+1.6 What does isolation_root do ?
+---------------------------------
+
+If the isolation_root flag is enabled (1) in a cgroup, then all tasks
+in this cgroup and its children will see this group as its top group
+in /proc/$PID/cgroup. Also mounts of cgroup filesystem performed by a task
+in isolation root cgroup will see isolation root cgroup as top cgroup.
+It is impossible for a task to exit isolated root. Flag may only be set or
+cleared when the cgroup is not in use.
+The preffered way to use isolation_root for containers (eg. lxc) is to
+create 'master' cgroup - /sys/fs/cgroup/cpu/container_name with settings
+for the container, then create /sys/fs/cgroup/cpu/container_name/root with
+isolation_root flag set and add the 'init' task for the container to
+this cgroup.
+
+1.7 How do I use cgroups ?
 --------------------------
 
 To start a new job that is to be contained within a cgroup, using
-- 
1.7.4.1


  parent reply	other threads:[~2011-09-30 12:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 11:36 [PATCH 0/6] cgroup: add isolation_root flag, poor man's namespaces for cgroups Witold Krecicki
2011-09-30 11:36 ` [PATCH 1/6] cgroup: add cgroup.isolation_root flag entry to the cgroup filesystem Witold Krecicki
2011-10-20 10:12   ` Paul Menage
2011-10-20 13:20     ` Witold Krecicki
2011-09-30 11:36 ` [PATCH 2/6] cgroup: make 'cgroup_is_descendant' function take cgroup as a 'descendant of' argument Witold Krecicki
2011-09-30 11:36 ` [PATCH 3/6] cgroup: add 'root' parameter to cgroup_path function Witold Krecicki
2011-09-30 13:48   ` Witold Krecicki
2011-09-30 11:36 ` [PATCH 4/6] cgroup: disallow task from leaving cgroup isolated root Witold Krecicki
2011-09-30 11:36 ` [PATCH 5/6] cgroup: make cgroup filesystem mounts performed by task inside isolation root see its isolation root as top cgroup Witold Krecicki
2011-09-30 11:36 ` Witold Krecicki [this message]
     [not found] ` <CA+RrjuVOhmkMLinMkiN3pr5Yea6pBA+XNQVQ=h2bMo66VpCixg@mail.gmail.com>
2011-10-13  7:05   ` [PATCH 0/6] cgroup: add isolation_root flag, poor man's namespaces for cgroups Witold Krecicki
2011-10-20 10:11 ` Paul Menage
2011-10-20 10:25   ` Witold Krecicki
2011-10-20 10:38     ` Paul Menage

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=1317382585-12172-7-git-send-email-wpk@culm.net \
    --to=wpk@culm.net \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=paul@paulmenage.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).