From: Nikanth Karthikesan <knikanth@suse.de>
To: Paul Menage <menage@google.com>
Cc: linux-kernel@vger.kernel.org
Subject: cpusets: document adding/removing cpus to cpuset elaborately
Date: Tue, 16 Jun 2009 16:46:50 +0530 [thread overview]
Message-ID: <200906161646.50305.knikanth@suse.de> (raw)
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>
---
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
-----------------
next reply other threads:[~2009-06-16 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 11:16 Nikanth Karthikesan [this message]
2009-06-17 0:45 ` cpusets: document adding/removing cpus to cpuset elaborately Li Zefan
2009-06-17 9:42 ` 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=200906161646.50305.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/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