diff options
author | Davidlohr Bueso | 2011-05-11 00:03:09 +0200 |
---|---|---|
committer | Karel Zak | 2011-05-11 16:17:56 +0200 |
commit | 42708f12f0847aec30839a4531ae016b1693f9c9 (patch) | |
tree | 6df5c2e29446aea64e372ab3b407deb02f920981 /schedutils/taskset.1 | |
parent | taskset: use xalloc lib (diff) | |
download | kernel-qcow2-util-linux-42708f12f0847aec30839a4531ae016b1693f9c9.tar.gz kernel-qcow2-util-linux-42708f12f0847aec30839a4531ae016b1693f9c9.tar.xz kernel-qcow2-util-linux-42708f12f0847aec30839a4531ae016b1693f9c9.zip |
taskset: make threads aware
Add a new '-a' option to view/modify the CPU affinity for an entire
group of threads belonging to a given PID. We create two new
functions, print_affinity() and do_taskset() for code simplification.
Example:
zeus@jilguero:~/src/util-linux/schedutils$ ./taskset -a -p 01 3142
pid 3142's current affinity mask: 2
pid 3142's new affinity mask: 1
pid 3164's current affinity mask: 2
pid 3164's new affinity mask: 1
pid 854's current affinity mask: 2
pid 854's new affinity mask: 1
[kzak@redhat.com: - clean up
- move variables to struct taskset]
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Tested-by: Jonathan Gonzalez <zeus@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'schedutils/taskset.1')
-rw-r--r-- | schedutils/taskset.1 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/schedutils/taskset.1 b/schedutils/taskset.1 index f374b62df..4aa5e2cbf 100644 --- a/schedutils/taskset.1 +++ b/schedutils/taskset.1 @@ -72,6 +72,9 @@ returns, it is guaranteed that the given program has been scheduled to a legal CPU. .SH OPTIONS .TP +.BR \-a ,\ \-\-all-tasks +set or retrieve the CPU affinity of all the tasks (threads) for a given PID. +.TP .BR \-p ,\ \-\-pid operate on an existing PID and not launch a new task .TP |