]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cpusets: document adding/removing cpus to cpuset elaborately
authorNikanth Karthikesan <knikanth@suse.de>
Tue, 30 Jun 2009 18:41:36 +0000 (11:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Jul 2009 01:56:01 +0000 (18:56 -0700)
By writing a tasks's pid to the file, a process adds that task to that
cgroup/cpuset.  But to add a cpu/mem to a cpuset, the new list of cpus
should be written to the cpuset.mems file which would replace the old list
of cpus.  Make this clearer in the documentation.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/cgroups/cpusets.txt

index f9ca389dddf49a7f1bc80c7e724b4a2ffa7e1ba4..1d7e9784439adee55d9d7e983f90e2006b7ef954 100644 (file)
@@ -777,6 +777,18 @@ in cpuset directories:
 # /bin/echo 1-4 > cpus         -> set cpus list to cpus 1,2,3,4
 # /bin/echo 1,2,3,4 > cpus     -> set cpus list to cpus 1,2,3,4
 
+To add a CPU to a cpuset, write the new list of CPUs including the
+CPU to be added. To add 6 to the above cpuset:
+
+# /bin/echo 1-4,6 > cpus       -> set cpus list to cpus 1,2,3,4,6
+
+Similarly to remove a CPU from a cpuset, write the new list of CPUs
+without the CPU to be removed.
+
+To remove all the CPUs:
+
+# /bin/echo "" > cpus          -> clear cpus list
+
 2.3 Setting flags
 -----------------