Updated version. Updated documentation. Updated copyright.

Added contributor recognition.  Updated links to new project
hosting site.
python3
Alex Tsariounov 14 years ago
parent bd2f26b93a
commit 08be173ace

@ -1,12 +1,15 @@
Lead:
Alex Tsariounov <alext@novell.com>
http://www.novell.com/realtime
http://www.novell.com
Credits:
Credits (in alphabetical order):
Thomas Grohmann <Thomas.Grohmann@gmx.net>
Bug#26
- Bug#26.
Christopher Johnston <chjohnst@gmail.com>
- Fix for case-sensitive set search.
Alex Piavka <piavka@cs.bgu.ac.il>
Gentoo ebuild script
- Gentoo ebuild script.

11
NEWS

@ -1,3 +1,14 @@
============================================================
Cpuset 1.5.3 (February 11, 2010)
http://code.google.com/p/cpuset
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Maintenace update to 1.5.2 includes fixes as follows.
* Code repository and project hosting to Google Code Hosting.
* Apply patch submitted by Chrstopher Johnston to fix failure of
finding cpusets in a case-sensitive manner.
============================================================
Cpuset 1.5.2 (December 2, 2009)
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.5.2/

@ -3,19 +3,19 @@ standard Linux filesystem calls to make using the cpusets facilities
in the Linux kernel easier.
For the latest version see:
http://developer.novell.com/wiki/index.php/cpuset
http://code.google.com/p/cpuset
For packages, see the OpenSUSE build service:
http://download.opensuse.org/repositories/home:/tsariounov:/Cpuset
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset
Bugs or feature requests should be sent to:
http://devzilla.novell.com/cpuset/
http://code.google.com/p/cpuset/issues/list
or for supported products, the Novell Bugzilla at:
http://bugzilla.novell.com
-----
Copyright (C) 2008-2009 Novell Inc.
Copyright (C) 2008-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>

@ -1,12 +1,12 @@
#
# spec file for package cpuset (Version 1.5.2)
#
# Copyright (c) 2008-2009 Novell, Inc. Waltham, MA, USA
# Copyright (c) 2008-2010 Novell, Inc. Waltham, MA, USA
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via
# http://devzilla.novell.com/cpuset
# http://code.google.com/p/cpuset/issues/list
# Or
# http://bugs.opensuse.org/
#
@ -20,7 +20,7 @@ Version: 1.5.2
Release: 1
License: GPL v2 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://developer.novell.com/wiki/index.php/Cpuset
Url: http://code.google.com/p/cpuset
Group: System/Management
Summary: Allows manipulation of cpusets on system and provides higher level functions
Source: %{name}-%{version}.tar.gz

@ -1,5 +1,5 @@
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -1,5 +1,5 @@
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -9,7 +9,7 @@ these defaults.
"""
__copyright__ = """
Copyright (C) 2009 Novell Inc.
Copyright (C) 2009-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2008 Novell Inc.
Copyright (C) 2008-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -2,7 +2,7 @@
"""
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -1,5 +1,5 @@
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify
@ -16,4 +16,4 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
version = '1.5.2'
version = '1.5.3'

@ -1,7 +1,7 @@
#!/usr/bin/env python
__copyright__ = """
Copyright (C) 2007-2009 Novell Inc.
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify

@ -1,14 +1,25 @@
.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "CSET\-PROC" "1" "02/07/2009" "" ""
'\" t
.\" Title: cset-proc
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CSET\-PROC" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
cset\-proc \- manage processes running in cpusets
cset-proc \- manage processes running in cpusets
.SH "SYNOPSIS"
.sp
.nf
@ -25,138 +36,207 @@ cset\-proc \- manage processes running in cpusets
\fIcset\fR proc \-\-move \-\-pid=42 \-\-fromset=/group1/myset \-\-toset=/group2/yourset
.fi
.SH "OPTIONS"
.TP
.PP
\-h, \-\-help
.RS 4
prints the list of options for this command
.TP
.RE
.PP
\-l, \-\-list
.RS 4
list processes in the specified cpuset
.TP
.RE
.PP
\-e, \-\-exec
.RS 4
execute arguments in the specified cpuset
.TP
.RE
.PP
\-u USER, \-\-user=USER
.RS 4
use this USER to \-\-exec (id or name)
.TP
.RE
.PP
\-g GROUP, \-\-group=GROUP
.RS 4
use this GROUP to \-\-exec (id or name)
.TP
.RE
.PP
\-m, \-\-move
.RS 4
move specified tasks to specified cpuset; to move a PIDSPEC to a cpuset, use \-m PIDSPEC cpuset; to move all tasks specify \-\-fromset and \-\-toset
.TP
.RE
.PP
\-p PIDSPEC, \-\-pid=PIDSPEC
.RS 4
specify pid or tid specification
.TP
.RE
.PP
\-\-threads
.RS 4
if specified, any processes found in the PIDSPEC to have multiple threads will automatically have all their threads added to the PIDSPEC (use to move all related threads to a cpuset)
.TP
.RE
.PP
\-s CPUSET, \-\-set=CPUSET
.RS 4
specify name of immediate cpuset
.TP
.RE
.PP
\-t TOSET, \-\-toset=TOSET
.RS 4
specify name of destination cpuset
.TP
.RE
.PP
\-f FROMSET, \-\-fromset=FROMSET
.RS 4
specify name of origination cpuset
.TP
.RE
.PP
\-k, \-\-kthread
.RS 4
move, or include moving, unbound kernel threads
.TP
.RE
.PP
\-\-force
.RS 4
force all processes and threads to be moved
.TP
.RE
.PP
\-v, \-\-verbose
.RS 4
prints more detailed output, additive
.RE
.SH "DESCRIPTION"
This command is used to run and manage arbitrary processes on specified cpusets. It is also used to move pre\-existing processes and threads to specified cpusets. You may note there is no "kill" or "destroy" option \(em use the standard OS ^C or kill commands for that.
This command is used to run and manage arbitrary processes on specified cpusets\&. It is also used to move pre\-existing processes and threads to specified cpusets\&. You may note there is no "kill" or "destroy" option \(em use the standard OS ^C or kill commands for that\&.
To list which tasks are running in a particular cpuset, use the \-\-list command.
To list which tasks are running in a particular cpuset, use the \-\-list command\&.
For example:
\fB# cset proc \-\-list \-\-set myset\fR
This command will list all the tasks running in the cpuset called "myset".
This command will list all the tasks running in the cpuset called "myset"\&.
Processes are created by specifying the path to the executable and specifying the cpuset that the process is to be created in.
Processes are created by specifying the path to the executable and specifying the cpuset that the process is to be created in\&.
For example:
\fB# cset proc \-\-set=blazing_cpuset \-\-exec /usr/bin/fast_code\fR
This command will execute the /usr/bin/fast_code program on the "blazing_cpuset" cpuset.
This command will execute the /usr/bin/fast_code program on the "blazing_cpuset" cpuset\&.
Note that if your command takes options, then use the traditional "\-\-" marker to separate cset\(cqs options from your command\(cqs options.
Note that if your command takes options, then use the traditional "\-\-" marker to separate cset\(cqs options from your command\(cqs options\&.
For example:
\fB# cset proc \-\-set myset \-\-exec \(em ls \-l\fR
This command will execute "ls \-l" on the cpuset called "myset".
This command will execute "ls \-l" on the cpuset called "myset"\&.
The PIDSPEC argument taken for the move command is a comma separated list of PIDs or TIDs. The list can also include brackets of PIDs or TIDs (i.e. tasks) that are inclusive of the endpoints.
The PIDSPEC argument taken for the move command is a comma separated list of PIDs or TIDs\&. The list can also include brackets of PIDs or TIDs (i\&.e\&. tasks) that are inclusive of the endpoints\&.
For example:
.sp
.if n \{\
.RS 4
.\}
.nf
1,2,5 Means processes 1, 2 and 5
1,2,600\-700 Means processes 1, 2 and from 600 to 700
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
The range of PIDs or TIDs does not need to have every position populated. In other words, for the example above, if there is only one process, say PID 57, in the range of 50\-65, then only that process will be moved.
To move a PIDSPEC to a specific cpuset, you can either specify the PIDSPEC with \-\-pid and the destination cpuset with \-\-toset, or use the short hand and list the cpuset name after the PIDSPEC for the \-\-move arguments.
.ps -1
.br
The range of PIDs or TIDs does not need to have every position populated\&. In other words, for the example above, if there is only one process, say PID 57, in the range of 50\-65, then only that process will be moved\&.
.sp .5v
.RE
To move a PIDSPEC to a specific cpuset, you can either specify the PIDSPEC with \-\-pid and the destination cpuset with \-\-toset, or use the short hand and list the cpuset name after the PIDSPEC for the \-\-move arguments\&.
The move command accepts multiple common calling methods. For example, the following commands are equivalent:
The move command accepts multiple common calling methods\&. For example, the following commands are equivalent:
\fB# cset proc \-\-move 2442,3000\-3200 reserved_set\fR
\fB# cset proc \-\-move \-\-pid=2442,3000\-3200 \-\-toset=reserved_set\fR
These commands move the tasks defined as 2442 and any running task between 3000 and 3200 inclusive of the ends to the cpuset called "reserved_set".
These commands move the tasks defined as 2442 and any running task between 3000 and 3200 inclusive of the ends to the cpuset called "reserved_set"\&.
Specifying the \-\-fromset is not necessary since the tasks will be moved to the destination cpuset no matter which cpuset they are currently running on.
Specifying the \-\-fromset is not necessary since the tasks will be moved to the destination cpuset no matter which cpuset they are currently running on\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
However, if you do specify a cpuset with the \-\-fromset option, then only those tasks that are both in the PIDSPEC \fBand\fR are running in the cpuset specified by \-\-fromset will be moved. I.e., if there is a task running on the system but not in \-\-fromset that is in PIDSPEC, it will not be moved.
If the \-\-threads switch is used, then the proc command will gather any threads of belonging to any processes or threads that are specified in the PIDSPEC and move them. This provides an easy way to move all related threads: just pick one TID from the set and use the \-\-threads option.
.ps -1
.br
However, if you do specify a cpuset with the \-\-fromset option, then only those tasks that are both in the PIDSPEC \fBand\fR are running in the cpuset specified by \-\-fromset will be moved\&. I\&.e\&., if there is a task running on the system but not in \-\-fromset that is in PIDSPEC, it will not be moved\&.
.sp .5v
.RE
If the \-\-threads switch is used, then the proc command will gather any threads of belonging to any processes or threads that are specified in the PIDSPEC and move them\&. This provides an easy way to move all related threads: just pick one TID from the set and use the \-\-threads option\&.
To move all userspace tasks from one cpuset to another, you need to specify the source and destination cpuset by name.
To move all userspace tasks from one cpuset to another, you need to specify the source and destination cpuset by name\&.
For example:
\fB# cset proc \-\-move \-\-fromset=comp1 \-\-toset=comp42\fR
This command specifies that all processes and threads running on cpuset "comp1" be moved to cpuset "comp42".
This command specifies that all processes and threads running on cpuset "comp1" be moved to cpuset "comp42"\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
This move command will not move kernel threads unless the \-k/\-\-kthread switch is specified. If it is, then all unbound kernel threads will be added to the move. Unbound kernel threads are those that can run on any CPU. If you \fBalso specify\fR the \-\-force switch, then all tasks, kernel or not, bound or not, will be moved.
.ps -1
.br
This move command will not move kernel threads unless the \-k/\-\-kthread switch is specified\&. If it is, then all unbound kernel threads will be added to the move\&. Unbound kernel threads are those that can run on any CPU\&. If you \fBalso specify\fR the \-\-force switch, then all tasks, kernel or not, bound or not, will be moved\&.
.sp .5v
.RE
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBCaution\fR
Please be cautious with the \-\-force switch, since moving a kernel thread that is bound to a specific CPU to a cpuset that does not include that CPU can cause a system hang.
You must specify unique cpuset names for the both exec and move commands. If a simple name passed to the \-\-fromset, \-\-toset and \-\-set parameters is unique on the system then that command executes. However, if there are multiple cpusets by that name, then you will need to specify which one you mean with a full path rooted at the base cpuset tree.
.ps -1
.br
Please be cautious with the \-\-force switch, since moving a kernel thread that is bound to a specific CPU to a cpuset that does not include that CPU can cause a system hang\&.
.sp .5v
.RE
You must specify unique cpuset names for the both exec and move commands\&. If a simple name passed to the \-\-fromset, \-\-toset and \-\-set parameters is unique on the system then that command executes\&. However, if there are multiple cpusets by that name, then you will need to specify which one you mean with a full path rooted at the base cpuset tree\&.
For example, suppose you have the following cpuset tree:
.sp
.if n \{\
.RS 4
.\}
.nf
/cpusets
/group1
@ -166,23 +246,27 @@ For example, suppose you have the following cpuset tree:
/myset
/yourset
.fi
.if n \{\
.RE
.\}
.sp
Then, to move a process from myset in group1 to yourset in group2, you would have to issue the following command:
# cset proc \-\-move \-\-pid=50 \-\-fromset=/group1/myset \-\-toset=/group2/yourset
You do not have to worry about where in the Linux filesystem the cpuset filesystem is mounted. The cset command takes care of that. Any cpusets that are specified by path (such as above), are done with respect to the root of the cpuset filesystem.
You do not have to worry about where in the Linux filesystem the cpuset filesystem is mounted\&. The cset command takes care of that\&. Any cpusets that are specified by path (such as above), are done with respect to the root of the cpuset filesystem\&.
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only.
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2009 Novell Inc.
Copyright (c) 2008\-2010 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell.com>.
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
cset(1), cset\-set(1), cset\-shield(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
/usr/share/doc/packages/cpuset/html/tutorial\&.html
taskset(1), chrt(1)
/usr/src/linux/Documentation/cpusets.txt
/usr/src/linux/Documentation/cpusets\&.txt

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.3.3" />
<meta name="generator" content="AsciiDoc 8.4.5" />
<title>cset-proc(1)</title>
<style type="text/css">
/* Debug borders */
@ -91,7 +91,7 @@ span#author {
}
span#email {
}
span#revision {
span#revnumber, span#revdate, span#revremark {
font-family: sans-serif;
}
@ -111,11 +111,13 @@ div#footer-badges {
padding-bottom: 0.5em;
}
div#preamble,
div#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-right: 10%;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
@ -157,9 +159,6 @@ div.sidebarblock > div.content {
padding: 0.5em;
}
div.listingblock {
margin-right: 0%;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
@ -168,6 +167,7 @@ div.listingblock > div.content {
div.quoteblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
@ -176,6 +176,7 @@ div.quoteblock > div.attribution {
div.verseblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.verseblock > div.content {
white-space: pre;
@ -208,8 +209,8 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
@ -305,6 +306,10 @@ div.hdlist.compact tr {
padding-bottom: 0;
}
.comment {
background: yellow;
}
@media print {
div#footer-badges { display: none; }
}
@ -407,7 +412,7 @@ cset-proc(1) Manual Page
</p>
</div>
</div>
<h2>SYNOPSIS</h2>
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<div class="verseblock-content"><em>cset</em> [cset options] <em>proc</em> [proc options] [args]
@ -680,7 +685,7 @@ respect to the root of the cpuset filesystem.</p></div>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2009 Novell Inc.</p></div>
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div>
</div>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
@ -695,8 +700,8 @@ respect to the root of the cpuset filesystem.</p></div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.0<br />
Last updated 2009-02-07 18:55:55 MDT
Version 1.5.3<br />
Last updated 2010-02-11 13:36:15 MDT
</div>
</div>
</body>

@ -1,7 +1,7 @@
cset-proc(1)
============
Alex Tsariounov <alext@novell.com>
v1.5.0, February 2009
v1.5.3, February 2010
NAME
----
@ -207,7 +207,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT
---------
Copyright (c) 2008-2009 Novell Inc.
Copyright (c) 2008-2010 Novell Inc.
AUTHOR
------

@ -1,14 +1,25 @@
.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "CSET\-SET" "1" "02/07/2009" "" ""
'\" t
.\" Title: cset-set
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CSET\-SET" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
cset\-set \- manage sets of cpus
cset-set \- manage sets of cpus
.SH "SYNOPSIS"
.sp
.nf
@ -26,81 +37,103 @@ cset\-set \- manage sets of cpus
\fIcset\fR set \-\-destroy /mygroup_sets/my_set
.fi
.SH "OPTIONS"
.TP
.PP
\-h, \-\-help
.RS 4
prints the list of options for this command
.TP
.RE
.PP
\-l, \-\-list
.RS 4
list the named cpuset(s); if \-a is used, will list members of named cpuset; if \-r is used, will list recursively
.TP
.RE
.PP
\-c CPUSPEC, \-\-cpu=CPUSPEC
.RS 4
create or modify cpuset in the specified cpuset with CPUSPEC specification
.TP
.RE
.PP
\-m MEMSPEC, \-\-mem=MEMSPEC
.RS 4
specify which memory nodes to assign to the created or modified cpuset
.TP
.RE
.PP
\-d, \-\-destroy
.RS 4
destroy specified cpuset
.TP
.RE
.PP
\-s CPUSET, \-\-set=CPUSET
.RS 4
specify cpuset name to be acted on
.TP
.RE
.PP
\-r, \-\-recurse
.RS 4
do recursive listing, for use with \-\-list
.TP
.RE
.PP
\-v, \-\-verbose
.RS 4
prints more detailed output, for the set command, using this flag will not chop listing to fit in 80 columns
.TP
.RE
.PP
\-\-cpu_exclusive
.RS 4
mark this cpuset as owning its CPUs exclusively
.TP
.RE
.PP
\-\-mem_exclusive
.RS 4
mark this cpuset as owning its MEMs exclusively
.RE
.SH "DESCRIPTION"
This command is used to create, modify, and destroy cpusets. Cpusets form a tree\-like structure rooted at the root cpuset which always includes all system CPUs and all system memory nodes.
This command is used to create, modify, and destroy cpusets\&. Cpusets form a tree\-like structure rooted at the root cpuset which always includes all system CPUs and all system memory nodes\&.
A cpuset is an organizational unit that defines a group of CPUs and a group of memory nodes where a process or thread (i.e. task) is allowed to run on. For non\-NUMA machines, the memory node is always 0 (zero) and cannot be set to anything else. For NUMA machines, the memory node can be set to a similar specification as the CPU definition and will tie those memory nodes to that cpuset. You will usually want the memory nodes that belong to the CPUs defined to be in the same cpuset.
A cpuset is an organizational unit that defines a group of CPUs and a group of memory nodes where a process or thread (i\&.e\&. task) is allowed to run on\&. For non\-NUMA machines, the memory node is always 0 (zero) and cannot be set to anything else\&. For NUMA machines, the memory node can be set to a similar specification as the CPU definition and will tie those memory nodes to that cpuset\&. You will usually want the memory nodes that belong to the CPUs defined to be in the same cpuset\&.
A cpuset can have exclusive right to the CPUs defined in it. This means that only this cpuset can own these CPUs. Similarly, a cpuset can have exclusive right to the memory nodes defined in it. This means that only this cpuset can own these memory nodes.
A cpuset can have exclusive right to the CPUs defined in it\&. This means that only this cpuset can own these CPUs\&. Similarly, a cpuset can have exclusive right to the memory nodes defined in it\&. This means that only this cpuset can own these memory nodes\&.
Cpusets can be specified by name or by path; however, care should be taken when specifying by name if the name is not unique. This tool will generally not let you do destructive things to non\-unique cpuset names.
Cpusets can be specified by name or by path; however, care should be taken when specifying by name if the name is not unique\&. This tool will generally not let you do destructive things to non\-unique cpuset names\&.
Cpusets are uniquely specified by path. The path starts at where the cpusets filesystem is mounted so you generally do not have to know where that is. For example, so specify a cpuset that is called "two" which is a subset of "one" which in turn is a subset of the root cpuset, use the path "/one/two" regardless of where the cpusets filesystem is mounted.
Cpusets are uniquely specified by path\&. The path starts at where the cpusets filesystem is mounted so you generally do not have to know where that is\&. For example, so specify a cpuset that is called "two" which is a subset of "one" which in turn is a subset of the root cpuset, use the path "/one/two" regardless of where the cpusets filesystem is mounted\&.
When specifying CPUs, a so\-called CPUSPEC is used. The CPUSPEC will accept a comma\-separated list of CPUs and inclusive range specifications. For example, \-\-cpu=1,3,5\-7 will assign CPU1, CPU3, CPU5, CPU6, and CPU7 to the specified cpuset.
When specifying CPUs, a so\-called CPUSPEC is used\&. The CPUSPEC will accept a comma\-separated list of CPUs and inclusive range specifications\&. For example, \-\-cpu=1,3,5\-7 will assign CPU1, CPU3, CPU5, CPU6, and CPU7 to the specified cpuset\&.
Note that cpusets follow certain rules. For example, children can only include CPUs that the parents already have. If you do not follow those rules, the kernel cpuset subsystem will not let you create that cpuset. For example, if you create a cpuset that contains CPU3, and then attempt to create a child of that cpuset with a CPU other than 3, you will get an error, and the cpuset will not be active. The error is somewhat cryptic in that it is usually a "Permission denied" error.
Note that cpusets follow certain rules\&. For example, children can only include CPUs that the parents already have\&. If you do not follow those rules, the kernel cpuset subsystem will not let you create that cpuset\&. For example, if you create a cpuset that contains CPU3, and then attempt to create a child of that cpuset with a CPU other than 3, you will get an error, and the cpuset will not be active\&. The error is somewhat cryptic in that it is usually a "Permission denied" error\&.
Memory nodes are specified with a MEMSPEC in a similar way to the CPUSPEC. For example, \-\-mem=1,3\-6 will assign MEM1, MEM3, MEM4, MEM5, and MEM6 to the specified cpuset.
Memory nodes are specified with a MEMSPEC in a similar way to the CPUSPEC\&. For example, \-\-mem=1,3\-6 will assign MEM1, MEM3, MEM4, MEM5, and MEM6 to the specified cpuset\&.
Note that if you attempt to create or modify a cpuset with a memory node specification that is not valid, you may get a cryptic error message, "No space left on device", and the modification will not be allowed.
Note that if you attempt to create or modify a cpuset with a memory node specification that is not valid, you may get a cryptic error message, "No space left on device", and the modification will not be allowed\&.
When you destroy a cpuset, then the tasks running in that set are moved to the parent of that cpuset. If this is not what you want, then manually move those tasks to the cpuset of your choice with the \fIcset proc\fR command (see \fIcset proc \-\-help\fR for more information).
When you destroy a cpuset, then the tasks running in that set are moved to the parent of that cpuset\&. If this is not what you want, then manually move those tasks to the cpuset of your choice with the \fIcset proc\fR command (see \fIcset proc \-\-help\fR for more information)\&.
.SS "EXAMPLES"
.TP
.PP
Create a cpuset with the default memory specification
.RS 4
\fB# cset set \-\-cpu=2,4,6\-8 \-\-set=new_set\fR
This command creates a cpuset called "new_set" located off the root cpuset which holds CPUS 2,4,6,7,8 and node 0 (interleaved) memory. Note that \-\-set is optional, and you can just specify the name for the new cpuset after all arguments.
.TP
.RE
This command creates a cpuset called "new_set" located off the root cpuset which holds CPUS 2,4,6,7,8 and node 0 (interleaved) memory\&. Note that \-\-set is optional, and you can just specify the name for the new cpuset after all arguments\&.
.PP
Create a cpuset that specifies both CPUs and memory nodes
.RS 4
\fB# cset set \-\-cpu=3 \-\-mem=3 /rad/set_one\fR
.RE
Note that this command uses the full path method to specify the name of the new cpuset "/rad/set_one"\&. It also names the new cpuset implicitly (i\&.e\&. no \-\-set option, although you can use that if you want to)\&. If the "set_one" name is unique, you can subsequently refer to is just by that\&. Memory node 3 is assigned to this cpuset as well as CPU 3\&.
Note that this command uses the full path method to specify the name of the new cpuset "/rad/set_one". It also names the new cpuset implicitly (i.e. no \-\-set option, although you can use that if you want to). If the "set_one" name is unique, you can subsequently refer to is just by that. Memory node 3 is assigned to this cpuset as well as CPU 3.
The above commands will create the new cpusets, or if they already exist, they will modify them to the new specifications.
The above commands will create the new cpusets, or if they already exist, they will modify them to the new specifications\&.
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only.
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2009 Novell Inc.
Copyright (c) 2008\-2010 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell.com>.
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
cset(1), cset\-proc(1), cset\-shield(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
/usr/share/doc/packages/cpuset/html/tutorial\&.html
taskset(1), chrt(1)
/usr/src/linux/Documentation/cpusets.txt
/usr/src/linux/Documentation/cpusets\&.txt

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.3.3" />
<meta name="generator" content="AsciiDoc 8.4.5" />
<title>cset-set(1)</title>
<style type="text/css">
/* Debug borders */
@ -91,7 +91,7 @@ span#author {
}
span#email {
}
span#revision {
span#revnumber, span#revdate, span#revremark {
font-family: sans-serif;
}
@ -111,11 +111,13 @@ div#footer-badges {
padding-bottom: 0.5em;
}
div#preamble,
div#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-right: 10%;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
@ -157,9 +159,6 @@ div.sidebarblock > div.content {
padding: 0.5em;
}
div.listingblock {
margin-right: 0%;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
@ -168,6 +167,7 @@ div.listingblock > div.content {
div.quoteblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
@ -176,6 +176,7 @@ div.quoteblock > div.attribution {
div.verseblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.verseblock > div.content {
white-space: pre;
@ -208,8 +209,8 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
@ -305,6 +306,10 @@ div.hdlist.compact tr {
padding-bottom: 0;
}
.comment {
background: yellow;
}
@media print {
div#footer-badges { display: none; }
}
@ -407,7 +412,7 @@ cset-set(1) Manual Page
</p>
</div>
</div>
<h2>SYNOPSIS</h2>
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<div class="verseblock-content"><em>cset</em> [cset options] <em>set</em> [set options] [args]
@ -609,7 +614,7 @@ already exist, they will modify them to the new specifications.</p></div>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2009 Novell Inc.</p></div>
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div>
</div>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
@ -624,8 +629,8 @@ already exist, they will modify them to the new specifications.</p></div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.0<br />
Last updated 2009-02-07 18:55:56 MDT
Version 1.5.3<br />
Last updated 2010-02-11 13:36:30 MDT
</div>
</div>
</body>

@ -1,7 +1,7 @@
cset-set(1)
===========
Alex Tsariounov <alext@novell.com>
v1.5.0, February 2009
v1.5.3, February 2010
NAME
----
@ -156,7 +156,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT
---------
Copyright (c) 2008-2009 Novell Inc.
Copyright (c) 2008-2010 Novell Inc.
AUTHOR
------

@ -1,14 +1,25 @@
.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "CSET\-SHIELD" "1" "02/07/2009" "" ""
'\" t
.\" Title: cset-shield
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 02/11/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CSET\-SHIELD" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
cset\-shield \- cpuset supercommand which implements cpu shielding
cset-shield \- cpuset supercommand which implements cpu shielding
.SH "SYNOPSIS"
.sp
.nf
@ -18,7 +29,7 @@ cset\-shield \- cpuset supercommand which implements cpu shielding
\fIcset\fR shield \-\-cpu 1\-7
\fIcset\fR shield \-\-cpu 1\-7 \-\-kthread=on
\fIcset\fR shield \-\-exec /opt/software/myapp/doit \-\-my_opt1 \-\-my_opt2
\fIcset\fR shield \-\-user appuser \-\-exec run_benchmark.sh
\fIcset\fR shield \-\-user appuser \-\-exec run_benchmark\&.sh
\fIcset\fR shield \-\-shield \-\-pid 1024,2048,5000\-1000
\fIcset\fR shield \-\-unshield \-\-pid 6000\-8500
\fIcset\fR shield \-\-kthread=off
@ -26,154 +37,219 @@ cset\-shield \- cpuset supercommand which implements cpu shielding
\fIcset\fR shield \-\-shield bash
.fi
.SH "OPTIONS"
.TP
.PP
\-h, \-\-help
.RS 4
prints the list of options for this command
.TP
.RE
.PP
\-c CPUSPEC, \-\-cpu=CPUSPEC
.RS 4
modifies or initializes the shield cpusets
.TP
.RE
.PP
\-r, \-\-reset
.RS 4
destroys the shield
.TP
.RE
.PP
\-e, \-\-exec
.RS 4
executes args in the shield
.TP
.RE
.PP
\-\-user=USER
.RS 4
use this USER for \-\-exec (id or name)
.TP
.RE
.PP
\-\-group=GROUP
.RS 4
use this GROUP for \-\-exec (id or name)
.TP
.RE
.PP
\-s, \-\-shield
.RS 4
shield PIDSPEC specified with \-p/\-\-pid of processes or threads
.TP
.RE
.PP
\-u, \-\-unshield
.RS 4
remove PIDSPEC specified with \-p/\-\-pid of processes or threads from the shield, the tasks keep running in the unshielded cpuset
.TP
.RE
.PP
\-\-threads
.RS 4
if specified, any processes found in the PIDSPEC to have multiple threads will automatically have all their threads added to the PIDSPEC (use to shield or unshield all related threads)
.TP
.RE
.PP
\-k on|off, \-\-kthread=on|off
.RS 4
shield from unbound interrupt threads as well
.TP
.RE
.PP
\-f, \-\-force
.RS 4
force operation, use with care
.TP
.RE
.PP
\-v, \-\-verbose
.RS 4
prints more detailed output, additive
.TP
.RE
.PP
\-\-sysset=SYSSET
.RS 4
optionally specify system cpuset name
.TP
.RE
.PP
\-\-userset=USERSET
.RS 4
optionally specify user cpuset name
.RE
.SH "DESCRIPTION"
This is a supercommand that creates basic cpu shielding. The normal cset commands can of course be used to create this basic shield, but the shield command combines many such commands to create and manage a common type of cpu shielding setup.
This is a supercommand that creates basic cpu shielding\&. The normal cset commands can of course be used to create this basic shield, but the shield command combines many such commands to create and manage a common type of cpu shielding setup\&.
The concept of shielding implies at minimum three cpusets, for example: root, user and system. The root cpuset always exists in all implementations of cpusets and contains all available CPUs on the machine. The system cpuset is so named because normal system tasks are made to run on it. The user cpuset is so named because that is the "shielded" cpuset on which you would run your tasks of interest.
The concept of shielding implies at minimum three cpusets, for example: root, user and system\&. The root cpuset always exists in all implementations of cpusets and contains all available CPUs on the machine\&. The system cpuset is so named because normal system tasks are made to run on it\&. The user cpuset is so named because that is the "shielded" cpuset on which you would run your tasks of interest\&.
Usually, CPU zero would be in the system set and the rest of the CPUs would be in the user set. After creation of the cpusets, all processes running in the root cpuset are moved to the system cpuset. Thus any new processes or threads spawned from these processes will also run the system cpuset.
Usually, CPU zero would be in the system set and the rest of the CPUs would be in the user set\&. After creation of the cpusets, all processes running in the root cpuset are moved to the system cpuset\&. Thus any new processes or threads spawned from these processes will also run the system cpuset\&.
If the optional \-\-kthread=on option is given to the shield command, then all kernel threads (with exception of the per\-CPU bound interrupt kernel threads) are also moved to the system set.
If the optional \-\-kthread=on option is given to the shield command, then all kernel threads (with exception of the per\-CPU bound interrupt kernel threads) are also moved to the system set\&.
One executes processes on the shielded user cpuset with the \-\-exec subcommand or moves processes or threads to the shielded cpuset with the \-\-shield subcommand with a \-\-pid option.
One executes processes on the shielded user cpuset with the \-\-exec subcommand or moves processes or threads to the shielded cpuset with the \-\-shield subcommand with a \-\-pid option\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
You do not need to specify which cpuset a process or thread is running in initially when using the \-\-shield subcommand.
To create a shield, you would execute the shield command with the \-\-cpu option that specifies CPUSPEC argument that assigns CPUs to be under the shield (this means assigned to the user cpuset, all other cpus will be assigned to the system set).
.ps -1
.br
You do not need to specify which cpuset a process or thread is running in initially when using the \-\-shield subcommand\&.
.sp .5v
.RE
To create a shield, you would execute the shield command with the \-\-cpu option that specifies CPUSPEC argument that assigns CPUs to be under the shield (this means assigned to the user cpuset, all other cpus will be assigned to the system set)\&.
For example:
\fB# cset shield \-\-cpu=1\-3\fR
On a 4\-way machine, this command will dedicate the first processor, CPU0, for the system set (unshielded) and the last three processors, CPU1, CPU2, CPU3, for the user set (shielded).
On a 4\-way machine, this command will dedicate the first processor, CPU0, for the system set (unshielded) and the last three processors, CPU1, CPU2, CPU3, for the user set (shielded)\&.
The CPUSPEC will accept a comma separated list of CPUs and inclusive range specifications. For example, \-\-cpu=1,3,5\-7 will assign CPU1, CPU3, CPU5, CPU6, and CPU7 to the user (or shielded) cpuset and the inverse of that to the system (or unshielded) cpuset.
The CPUSPEC will accept a comma separated list of CPUs and inclusive range specifications\&. For example, \-\-cpu=1,3,5\-7 will assign CPU1, CPU3, CPU5, CPU6, and CPU7 to the user (or shielded) cpuset and the inverse of that to the system (or unshielded) cpuset\&.
If you do not like the names "system" and "user" for the unshielded and shielded sets respectively, or if those names are used already, then use the \-\-sysset and \-\-userset options.
If you do not like the names "system" and "user" for the unshielded and shielded sets respectively, or if those names are used already, then use the \-\-sysset and \-\-userset options\&.
For example:
\fB# cset shield \-\-sysset=free \-\-userset=cage \-\-cpu=2,3 \-\-kthread=on\fR
The above command will use the name "free" for the unshielded system cpuset, the name "cage" for the shielded user cpuset, initialize these cpusets and dedicate CPU0 and CPU1 to the "free" set and (on a 4\-way machine) dedicate CPU2 and CPU3 to the "cage" set. Further, the command moves all processes and threads, including kernel threads from the root cpuset to the "free" cpuset.
The above command will use the name "free" for the unshielded system cpuset, the name "cage" for the shielded user cpuset, initialize these cpusets and dedicate CPU0 and CPU1 to the "free" set and (on a 4\-way machine) dedicate CPU2 and CPU3 to the "cage" set\&. Further, the command moves all processes and threads, including kernel threads from the root cpuset to the "free" cpuset\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
If you do use the \-\-syset/\-\-userset options, then you must continue to use those for every invocation of the shield supercommand.
After initialization, you can run the process of interest on the shielded cpuset with the \-\-exec subcommand, or move processes or threads already running to the shielded cpuset with the \-\-shield subcommand and the \-\-pid option.
.ps -1
.br
If you do use the \-\-syset/\-\-userset options, then you must continue to use those for every invocation of the shield supercommand\&.
.sp .5v
.RE
After initialization, you can run the process of interest on the shielded cpuset with the \-\-exec subcommand, or move processes or threads already running to the shielded cpuset with the \-\-shield subcommand and the \-\-pid option\&.
Note that if your execed command takes options, then use the traditional "\-\-" marker to separate cset\(cqs options from your command\(cqs options.
Note that if your execed command takes options, then use the traditional "\-\-" marker to separate cset\(cqs options from your command\(cqs options\&.
For example:
\fB# cset shield \-\-exec \(em ls \-l\fR
This command will execute "ls \-l" inside the shield.
This command will execute "ls \-l" inside the shield\&.
The PIDSPEC argument taken for the \-\-pid (or \-p) option is a comma separated list of PIDs or TIDs. The list can also include brackets of PIDs or TIDs that are inclusive of the endpoints.
The PIDSPEC argument taken for the \-\-pid (or \-p) option is a comma separated list of PIDs or TIDs\&. The list can also include brackets of PIDs or TIDs that are inclusive of the endpoints\&.
For example:
.sp
.if n \{\
.RS 4
.\}
.nf
1,2,5 Means processes 1, 2 and 5
1,2,600\-700 Means processes 1, 2 and from 600 to 700
.fi
.if n \{\
.RE
.\}
.sp
\fB# cset shield \-\-shield \-\-pid=50\-65\fR
The above command moves all processes and threads with PID or TID in the range 50\-65 inclusive, from the system cpuset into the shielded user cpuset. If they are running in the root cpuset, you must use the \-\-force option to actually move them into the shield.
The above command moves all processes and threads with PID or TID in the range 50\-65 inclusive, from the system cpuset into the shielded user cpuset\&. If they are running in the root cpuset, you must use the \-\-force option to actually move them into the shield\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
The range of PIDs or TIDs does not need to have every position populated. In other words, for the example above, if there is only one process, say PID 57, in the range of 50\-65, then only that process will be moved.
The \-\-unshield (or \-u) subcommand will remove the specified processes or threads from the shielded cpuset and move them into the unshielded (or system) cpuset. This command is also used in conjuction with a \-p/\-\-pid option that specifies a PIDSPEC argument, the same as for the \-\-shield subcommand.
.ps -1
.br
The range of PIDs or TIDs does not need to have every position populated\&. In other words, for the example above, if there is only one process, say PID 57, in the range of 50\-65, then only that process will be moved\&.
.sp .5v
.RE
The \-\-unshield (or \-u) subcommand will remove the specified processes or threads from the shielded cpuset and move them into the unshielded (or system) cpuset\&. This command is also used in conjuction with a \-p/\-\-pid option that specifies a PIDSPEC argument, the same as for the \-\-shield subcommand\&.
Both the \-\-shield and the \-\-unshield commands will also finally output the number of tasks running in the shield and out of the shield if you do not specify a PIDSPEC with \-\-pid. By specifying also a \-\-verbose in addition, then you will get a listing of every task that is running in either the shield or out of the shield.
Both the \-\-shield and the \-\-unshield commands will also finally output the number of tasks running in the shield and out of the shield if you do not specify a PIDSPEC with \-\-pid\&. By specifying also a \-\-verbose in addition, then you will get a listing of every task that is running in either the shield or out of the shield\&.
Using no subcommand, ie. only "cset shield", will output the status of both shield and non\-shield. Tasks will be listed if \-\-verbose is used.
Using no subcommand, ie\&. only "cset shield", will output the status of both shield and non\-shield\&. Tasks will be listed if \-\-verbose is used\&.
You can adjust which CPUs are in the shielded cpuset by issuing the \-\-cpu subcommand again anytime after the shield has been initialized.
You can adjust which CPUs are in the shielded cpuset by issuing the \-\-cpu subcommand again anytime after the shield has been initialized\&.
For example if the original shield contained CPU0 and CPU1 in the system set and CPU2 and CPU3 in the user set, if you then issue the following command:
\fB# cset shield \-\-cpu=1,2,3\fR
then that command will move CPU1 into the shielded "user" cpuset. Any processes or threads that were running on CPU1 that belonged to the unshielded "system" cpuset are migrated to CPU0 by the system.
then that command will move CPU1 into the shielded "user" cpuset\&. Any processes or threads that were running on CPU1 that belonged to the unshielded "system" cpuset are migrated to CPU0 by the system\&.
The \-\-reset subcommand will in essence destroy the shield. For example, if there was a shield on a 4\-way machine with CPU0 in system and CPUs 1\-3 in user with processes running on the user cpuset (i.e. in the shield), and a \-\-reset subcommand was issued, then all processes running in both system and user cpusets would be migrated to the root cpuset (which has access to all CPUs and never goes away), after which both system and user cpusets would be destroyed.
The \-\-reset subcommand will in essence destroy the shield\&. For example, if there was a shield on a 4\-way machine with CPU0 in system and CPUs 1\-3 in user with processes running on the user cpuset (i\&.e\&. in the shield), and a \-\-reset subcommand was issued, then all processes running in both system and user cpusets would be migrated to the root cpuset (which has access to all CPUs and never goes away), after which both system and user cpusets would be destroyed\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
Even though you can mix general usage of cpusets with the shielding concepts described here, you generally will not want to. For more complex shielding or usage scenarios, one would generally use the normal cpuset commands (i.e. cset set and proc) directly.
.ps -1
.br
Even though you can mix general usage of cpusets with the shielding concepts described here, you generally will not want to\&. For more complex shielding or usage scenarios, one would generally use the normal cpuset commands (i\&.e\&. cset set and proc) directly\&.
.sp .5v
.RE
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only.
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2009 Novell Inc.
Copyright (c) 2008\-2010 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell.com>.
Written by Alex Tsariounov <alext@novell\&.com>\&.
.SH "SEE ALSO"
cset(1), cset\-set(1), cset\-proc(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
/usr/share/doc/packages/cpuset/html/tutorial\&.html
taskset(1), chrt(1)
/usr/src/linux/Documentation/cpusets.txt
/usr/src/linux/Documentation/cpusets\&.txt

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.3.3" />
<meta name="generator" content="AsciiDoc 8.4.5" />
<title>cset-shield(1)</title>
<style type="text/css">
/* Debug borders */
@ -91,7 +91,7 @@ span#author {
}
span#email {
}
span#revision {
span#revnumber, span#revdate, span#revremark {
font-family: sans-serif;
}
@ -111,11 +111,13 @@ div#footer-badges {
padding-bottom: 0.5em;
}
div#preamble,
div#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-right: 10%;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
@ -157,9 +159,6 @@ div.sidebarblock > div.content {
padding: 0.5em;
}
div.listingblock {
margin-right: 0%;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
@ -168,6 +167,7 @@ div.listingblock > div.content {
div.quoteblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
@ -176,6 +176,7 @@ div.quoteblock > div.attribution {
div.verseblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.verseblock > div.content {
white-space: pre;
@ -208,8 +209,8 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
@ -305,6 +306,10 @@ div.hdlist.compact tr {
padding-bottom: 0;
}
.comment {
background: yellow;
}
@media print {
div#footer-badges { display: none; }
}
@ -407,7 +412,7 @@ cset-shield(1) Manual Page
</p>
</div>
</div>
<h2>SYNOPSIS</h2>
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<div class="verseblock-content"><em>cset</em> [cset options] <em>shield</em> [shield options] [args]
@ -701,7 +706,7 @@ and proc) directly.</td>
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2009 Novell Inc.</p></div>
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div>
</div>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
@ -716,8 +721,8 @@ and proc) directly.</td>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.0<br />
Last updated 2009-02-07 18:55:57 MDT
Version 1.5.3<br />
Last updated 2010-02-11 13:36:44 MDT
</div>
</div>
</body>

@ -1,7 +1,7 @@
cset-shield(1)
==============
Alex Tsariounov <alext@novell.com>
v1.5.0, February 2009
v1.5.3, February 2010
NAME
----
@ -230,7 +230,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT
---------
Copyright (c) 2008-2009 Novell Inc.
Copyright (c) 2008-2010 Novell Inc.
AUTHOR
------

@ -2,12 +2,12 @@
.\" Title: cset
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 12/02/2009
.\" Date: 02/11/2010
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CSET" "1" "12/02/2009" "[FIXME: source]" "[FIXME: manual]"
.TH "CSET" "1" "02/11/2010" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@ -135,7 +135,7 @@ Specify the mountpoint where the cpuset filesystem is to be mounted\&. By defaul
.SH "LICENSE"
Cpuset is licensed under the GNU GPL V2 only\&.
.SH "COPYRIGHT"
Copyright (c) 2008\-2009 Novell Inc\&.
Copyright (c) 2008\-2010 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell\&.com>

@ -634,7 +634,7 @@ mountpoint = &lt;directory_name&gt;
</div>
<h2 id="_copyright">COPYRIGHT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Copyright (c) 2008-2009 Novell Inc.</p></div>
<div class="paragraph"><p>Copyright (c) 2008-2010 Novell Inc.</p></div>
</div>
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
@ -653,8 +653,8 @@ http://www.procode.org/stgit). Stacked GIT is under GPL V2 or later.</p></div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.5.2<br />
Last updated 2009-12-02 14:07:17 MDT
Version 1.5.3<br />
Last updated 2010-02-11 13:37:05 MDT
</div>
</div>
</body>

@ -1,7 +1,7 @@
cset(1)
======
Alex Tsariounov <alext@novell.com>
v1.5.2, December 2009
v1.5.3, December 2010
NAME
----
@ -139,7 +139,7 @@ Cpuset is licensed under the GNU GPL V2 only.
COPYRIGHT
---------
Copyright (c) 2008-2009 Novell Inc.
Copyright (c) 2008-2010 Novell Inc.
AUTHOR
------

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.3.3" />
<meta name="generator" content="AsciiDoc 8.4.5" />
<title>Cpuset (cset) Tutorial</title>
<style type="text/css">
/* Debug borders */
@ -91,7 +91,7 @@ span#author {
}
span#email {
}
span#revision {
span#revnumber, span#revdate, span#revremark {
font-family: sans-serif;
}
@ -111,11 +111,13 @@ div#footer-badges {
padding-bottom: 0.5em;
}
div#preamble,
div#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-right: 10%;
margin-top: 1.5em;
margin-bottom: 1.5em;
}
@ -157,9 +159,6 @@ div.sidebarblock > div.content {
padding: 0.5em;
}
div.listingblock {
margin-right: 0%;
}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
@ -168,6 +167,7 @@ div.listingblock > div.content {
div.quoteblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
@ -176,6 +176,7 @@ div.quoteblock > div.attribution {
div.verseblock {
padding-left: 2.0em;
margin-right: 10%;
}
div.verseblock > div.content {
white-space: pre;
@ -208,8 +209,8 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
@ -305,6 +306,10 @@ div.hdlist.compact tr {
padding-bottom: 0;
}
.comment {
background: yellow;
}
@media print {
div#footer-badges { display: none; }
}
@ -462,7 +467,7 @@ function generateToc(toclevels) {
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>Alex Tsariounov &lt;<a href="mailto:alext@novell.com">alext@novell.com</a>&gt;<br />
Copyright (c) 2009 Novell Inc., cset v1.5.0<br />
Copyright (c) 2009-2010 Novell Inc., cset v1.5.3<br />
Verbatim copying and distribution of this entire article are permitted
worldwide, without royalty, in any medium, provided this notice is preserved.</p></div>
<div class="paragraph"><p>This tutorial describes basic and advanced usage of the <strong>cset</strong> command to
@ -1775,10 +1780,14 @@ To move all tasks from one cpuset to another:
log a bug with the <strong>cset</strong> bugzilla instance found here:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>http://devzilla.novell.com/cpuset</tt></pre>
<pre><tt>http://code.google.com/p/cpuset/issues/list</tt></pre>
</div></div>
<div class="paragraph"><p>If you are using <strong>cset</strong> on a supported operating system such as SLES or SLERT
from Novell, then feel free to use that bugzilla instead.</p></div>
from Novell, then please use that bugzilla instead at:</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>http://bugzilla.novell.com</tt></pre>
</div></div>
<div class="paragraph"><p>If the problem is repeatable, there is an excellent chance that it will get
fixed quickly. Also, <strong>cset</strong> contains a logging facility that is invaluable
for the developers to diagnose problems. To create a log of a run, use the
@ -1793,7 +1802,7 @@ Please attach this file to the bug.</p></div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2009-02-07 18:55:58 MDT
Last updated 2010-02-11 13:35:27 MDT
</div>
</div>
</body>

@ -2,7 +2,7 @@ Cpuset (cset) Tutorial
######################
Alex Tsariounov <alext@novell.com> +
Copyright (c) 2009 Novell Inc., cset v1.5.0 +
Copyright (c) 2009-2010 Novell Inc., cset v1.5.3 +
Verbatim copying and distribution of this entire article are permitted
worldwide, without royalty, in any medium, provided this notice is preserved.
@ -1329,10 +1329,12 @@ What To Do if There are Problems
If you encounter problems with the *cset* application, the best option is to
log a bug with the *cset* bugzilla instance found here:
http://devzilla.novell.com/cpuset
http://code.google.com/p/cpuset/issues/list
If you are using *cset* on a supported operating system such as SLES or SLERT
from Novell, then feel free to use that bugzilla instead.
from Novell, then please use that bugzilla instead at:
http://bugzilla.novell.com
If the problem is repeatable, there is an excellent chance that it will get
fixed quickly. Also, *cset* contains a logging facility that is invaluable
@ -1345,4 +1347,4 @@ application. For example.
-------------------------------------------------------------
That command saves a lot of debugging information in the 'logfile.txt' file.
Please attach this file to the bug.
Please attach this file to the bug.

@ -10,7 +10,7 @@ setup(name = 'cpuset',
license = 'GPLv2',
author = 'Alex Tsariounov',
author_email = 'alext@novell.com',
url = 'http://developer.novell.com/wiki/index.php/Cpuset',
url = 'http://code.google.com/p/cpuset',
description = 'Allows manipluation of cpusets and provides higher level functions.',
long_description = \
'Cpuset is a Python application to make using the cpusets facilities in the Linux\n'

Loading…
Cancel
Save