]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Documentation: update cgroup pid and cpuset information
authorEric B Munson <emunson@mgebm.net>
Tue, 15 Mar 2011 23:12:18 +0000 (16:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Mar 2011 17:47:04 +0000 (10:47 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/cgroups/cgroups.txt

index 44b8b7af8019e173390c00732a04db6a9839f189..cbdfb7d9455bcc58e6df3cad510d752b47742547 100644 (file)
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
 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 echoing 0:
 
 # 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
 --------------------------------