From: Randy Dunlap <rdunlap@xenotime.net>
To: lkml <linux-kernel@vger.kernel.org>
Cc: torvalds <torvalds@linux-foundation.org>,
Eric B Munson <emunson@mgebm.net>,
Paul Menage <menage@google.com>
Subject: [PATCH 5/6] Documentation: update cgroup pid and cpuset information
Date: Tue, 15 Mar 2011 16:12:18 -0700 [thread overview]
Message-ID: <20110315161218.817cd662.rdunlap@xenotime.net> (raw)
In-Reply-To: <20110315134316.465b6e2c.rdunlap@xenotime.net>
From: Eric B Munson <emunson@mgebm.net>
The cgroup documentation does not specify how a process can be removed from a
particular group. This patch adds a note at the end of the simple example
about how this is done. Also, some cgroups (like cpusets) require user input
before a new group can be used. This is noted in the patch as well.
Signed-off-by: Eric B Munson <emunson@mgebm.net>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
Changes from V1:
Rework the note about removing a process from a cgroup
Add note about ns cgroup causing failure when moving processes between groups
Documentation/cgroups/cgroups.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- lnx-2638-rc8.orig/Documentation/cgroups/cgroups.txt
+++ lnx-2638-rc8/Documentation/cgroups/cgroups.txt
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all ava
The "xxx" is not interpreted by the cgroup code, but will appear in
/proc/mounts so may be any useful identifying string that you like.
+Note: Some subsystems do not work without some user input first. For instance,
+if cpusets are enabled the user will have to populate the cpus and mems files
+for each new cgroup created before that group can be used.
+
To mount a cgroup hierarchy with just the cpuset and memory
subsystems, type:
# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +430,14 @@ You can attach the current shell task by
# echo 0 > tasks
+Note: Since every task is always a member of exactly one cgroup in each
+mounted hierarchy, to remove a task from its current cgroup you must
+move it into a new cgroup (possibly the root cgroup) by writing to the
+new cgroup's tasks file.
+
+Note: If the ns cgroup is active, moving a process to another cgroup can
+fail.
+
2.3 Mounting hierarchies by name
--------------------------------
next prev parent reply other threads:[~2011-03-15 23:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110315134316.465b6e2c.rdunlap@xenotime.net>
2011-03-15 23:11 ` [PATCH 2/6] Documentation: add devicetree docs index file Randy Dunlap
2011-03-15 23:11 ` [PATCH 3/6] Documentation: update header filename in CodingStyle Randy Dunlap
2011-03-16 5:13 ` Harry Wei
2011-03-15 23:12 ` [PATCH 4/6] Documentation: file handles are now freed Randy Dunlap
2011-03-15 23:12 ` Randy Dunlap [this message]
2011-03-15 23:12 ` [PATCH 6/6] sched.c: fix kernel-doc for runqueue_is_locked() Randy Dunlap
2011-03-16 13:56 ` [tip:sched/urgent] sched, kernel-doc: Fix runqueue_is_locked() description tip-bot for Randy Dunlap
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=20110315161218.817cd662.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=emunson@mgebm.net \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®