public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][resend] cpusets: document adding/removing cpus to cpuset elaborately
@ 2009-06-25  6:12 Li Zefan
  2009-06-25  6:15 ` Li Zefan
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2009-06-25  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Nikanth Karthikesan, Paul Menage, LKML

Writing a pid to the file, tasks 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>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
---
 Documentation/cgroups/cpusets.txt |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index f9ca389..1d7e978 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -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
 -----------------
 





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][resend] cpusets: document adding/removing cpus to cpuset elaborately
  2009-06-25  6:12 [PATCH][resend] cpusets: document adding/removing cpus to cpuset elaborately Li Zefan
@ 2009-06-25  6:15 ` Li Zefan
  0 siblings, 0 replies; 2+ messages in thread
From: Li Zefan @ 2009-06-25  6:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Nikanth Karthikesan, Paul Menage, LKML

oops, I forgot the 'From' line.


=====================


From: Nikanth Karthikesan <knikanth@suse.de>

Writing a pid to the file, tasks 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>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
---
 Documentation/cgroups/cpusets.txt |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index f9ca389..1d7e978 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -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
 -----------------
 





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-25  6:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25  6:12 [PATCH][resend] cpusets: document adding/removing cpus to cpuset elaborately Li Zefan
2009-06-25  6:15 ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox