Added current release 1.5.2 to repo.

python3 rel_1.5.2
Alex Tsariounov 15 years ago
parent c263d76012
commit 7509eceabe

@ -7,6 +7,7 @@ Makefile
NEWS
README
cset
cset.init.d
setup.cfg
setup.py
cpuset/__init__.py

@ -1,3 +1,3 @@
include README Makefile MANIFEST MANIFEST.in AUTHORS COPYING INSTALL NEWS ChangeLog TODO
include README Makefile MANIFEST MANIFEST.in AUTHORS COPYING INSTALL NEWS ChangeLog TODO cset.init.d
include t/README
include doc/*.txt doc/Makefile doc/*.conf doc/callouts.xsl doc/*.1 doc/*.html

29
NEWS

@ -1,7 +1,24 @@
============================================================
Cpuset 1.5.2 (December 2, 2009)
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.5.2/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Maintenance update to 1.5.1 includes bug fixes as follows.
Fixed Bugs:
* BNC#558395 - cset couldn't delete cpu set
* BNC#558399 - cset unable to move thread
Other fixes:
* Fixed failure to delete cpuset if tasks preset, cset now
waits a little bit for tardy tasks to disappear
* Removed output noise from popened taskset command
* Added example init.d cset script in documentation directory
============================================================
Cpuset 1.5.1 (June 17, 2009)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.5.1
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.5.1/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Maintenance update to 1.5.0 includes bug fixes as follows.
@ -12,7 +29,7 @@ Fixed Bugs:
============================================================
Cpuset 1.5.0 (February 7, 2009)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.5.0
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.5.0/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Major upgrade since 1.04. This release includes a number of bug fixes and
@ -58,7 +75,7 @@ Other fixes:
============================================================
Cpuset 1.04 (September 2, 2008)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.04
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.04/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Minor bug fixes and inclusion in SLERT10SP2 and slotted for SLES11.
@ -66,7 +83,7 @@ Minor bug fixes and inclusion in SLERT10SP2 and slotted for SLES11.
============================================================
Cpuset 1.03 (July 18, 2008)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.03
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.03/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Fixed class variables that made import of cset.as python library possible.
@ -74,7 +91,7 @@ Fixed class variables that made import of cset.as python library possible.
============================================================
Cpuset 1.02 (June 10, 2008)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.02
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.02/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
Minor fixes.
@ -82,7 +99,7 @@ Minor fixes.
============================================================
Cpuset 1.0 (May 30, 2008)
https://forgesvn1.novell.com/svn/cpuset/tags/rel_1.0
https://forgesvn1.novell.com/viewsvn/cpuset/tags/rel_1.0/
http://download.opensuse.org/repositories/home:/tsariounov:/cpuset/
First full-featured public release complete with man pages and html docs.

@ -10,6 +10,8 @@ For packages, see the OpenSUSE build service:
Bugs or feature requests should be sent to:
http://devzilla.novell.com/cpuset/
or for supported products, the Novell Bugzilla at:
http://bugzilla.novell.com
-----

@ -1,17 +1,22 @@
#
# spec file for package cpuset (Version 1.04)
# spec file for package cpuset (Version 1.5.2)
#
# Copyright (c) 2008-2009 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
# Please submit bugfixes or comments via
# http://devzilla.novell.com/cpuset
# Or
# http://bugs.opensuse.org/
#
# For supported products, via http://bugzilla.novell.com
#
# norootforbuild
Name: cpuset
Version: 1.5.1
Version: 1.5.2
Release: 1
License: GPL v2 only
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -32,7 +37,7 @@ BuildRequires: python-devel
Cpuset is a Python application to make using the cpusets facilities in
the Linux kernel easier. The actual included command is called cset
and it allows manipulation of cpusets on the system and provides higher
level functions such as implementation and control of a basic cpu
level functions such as implementation and control of a basic CPU
shielding setup.
@ -57,7 +62,7 @@ CFLAGS="%{optflags}" \
# Install documentation
%{__mkdir_p} %{buildroot}/%{_defaultdocdir}/cpuset
%{__cp} NEWS README INSTALL AUTHORS COPYING %{buildroot}/%{_defaultdocdir}/cpuset/
%{__cp} NEWS README INSTALL AUTHORS COPYING cset.init.d %{buildroot}/%{_defaultdocdir}/cpuset/
%{__mkdir_p} %{buildroot}/%{_mandir}/man1
cd doc
%{__gzip} *.1

@ -573,7 +573,7 @@ def is_unbound(proc):
# --> use /proc/<pid>/status -> Cpus_allowed
# int(line.replace(',',''), 16)
# note: delete leading zeros to compare to allcpumask
line = os.popen('/usr/bin/taskset -p ' + str(proc), 'r').readline()
line = os.popen('/usr/bin/taskset -p ' + str(proc) +' 2>/dev/null', 'r').readline()
aff = line.split()[-1]
log.debug('is_unbound, proc=%s aff=%s allcpumask=%s',
proc, aff, cset.allcpumask)

@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
import sys, os, logging
import sys, os, logging, time
from optparse import OptionParser, make_option
from cpuset import config
@ -246,9 +246,9 @@ def destroy_sets(sets, recurse=False, force=False):
"""destroy cpusets in list of sets, recurse if true, if force destroy if tasks running"""
log.debug('enter destroy_sets, sets=%s, force=%s', sets, force)
nl = []
try:
if isinstance(sets, list):
nl.extend(sets)
except:
else:
nl.append(sets)
# check that sets passed are ok, will raise if one is bad
sl2 = []
@ -292,10 +292,23 @@ def destroy(name):
"passed name=%s, which is not a string or CpuSet" % name)
else:
set = name
if len(set.tasks) > 0:
log.debug('%i tasks still running in set %s', len(set.tasks), name)
raise CpusetException(
"trying to destroy cpuset %s with tasks running" % name)
tsks = set.tasks
if len(tsks) > 0:
# wait for tasks, sometimes it takes a little while to
# have them leave the set
ii = 0
while len(tsks)>0:
log.debug('%i tasks still running in set %s, waiting interval %s...',
len(tsks), set.name, ii+1)
time.sleep(0.5)
tsks = set.tasks
ii += 1
if (ii) > 6:
# try it for 3 seconds, bail if tasks still there
raise CpusetException(
"trying to destroy cpuset %s with tasks running: %s" %
(set.path, set.tasks))
log.debug("tasks expired, deleting set %s" % set.path)
os.rmdir(cset.CpuSet.basepath+set.path)
# fixme: perhaps reparsing the all the sets is not so efficient...
cset.rescan()

@ -219,6 +219,8 @@ class CpuSet(object):
for task in f: lst.append(task[:-1])
return lst
def settasks(self, tasklist):
notfound = []
unmovable = []
if len(tasklist) > 3:
pb = ProgressBar(len(tasklist), '=')
tick = 0
@ -232,12 +234,20 @@ class CpuSet(object):
f.close()
except Exception, err:
if str(err).find('No such process') != -1:
log.info('**> task %s not found, not moved', task)
notfound.append(task)
elif str(err).find('Invalid argument'):
unmovable.append(task)
else:
raise
if prog:
tick += 1
pb(tick)
if len(notfound) > 0:
log.info('**> %s tasks were not found, so were not moved', len(notfound))
log.debug(' not found: %s', notfound)
if len(unmovable) > 0:
log.info('**> %s tasks are not movable, impossible to move', len(unmovable))
log.debug(' not movable: %s', unmovable)
log.debug("-> prop_set %s.tasks set with %s tasks", self.path,
len(tasklist))
tasks = property(gettasks, settasks, delprop, "Task list")

@ -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.1'
version = '1.5.2'

@ -0,0 +1,168 @@
#!/bin/sh
#
# Example system startup script for setting up presistent cpusets with the
# cset tool from package cpuset. Copy this script to /etc/init.d/cset and
# uncomment out the commands in start() and stop() below, or add your own.
# Based on /etc/init.d/skeleton template.
#
# Copyright (C) 2009 Novell, Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
#
#
# LSB compatible service control script; see http://www.linuxbase.org/spec/
#
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
# script on this template and ensure that it works on non UL based LSB
# compliant Linux distributions, you either have to provide the rc.status
# functions from UL or change the script to work without them.
# See skeleton.compat for a template that works with other distros as well.
#
### BEGIN INIT INFO
# Provides: cset
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Make cpuset setup persistent across boots
# Description: Configure desired cpuset setup with the
# cset tool for persistent cpusets across boots.
### END INIT INFO
#
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
CSET_BIN=/usr/bin/cset
test -x $CSET_BIN || { echo "$CSET_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# cset variables
CSET_SYSTEM=0
CSET_USER=1-7
# Check for existence of needed config file and read it
# This is not used for this example, but you can create one for
# your setup if you wish.
#CSET_CONFIG=/etc/sysconfig/cset
#test -r $CSET_CONFIG || { echo "$CSET_CONFIG not existing";
# if [ "$1" = "stop" ]; then exit 0;
# else exit 6; fi; }
# Read config
#. $CSET_CONFIG
# Source LSB init functions
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting cpuset "
# For a simple shield, we can use the shield subcommand as follows;
# however, for any setup more comples it is not recommended to use
# shield, but instead to use the set and proc subcommands. The reason
# is that the shield command has certain side effects which may complicate
# the setup. For example, shield marks the cpusets as exclusive.
##
#### Example 1: using the shield subcommand
##
#$CSET_BIN shield --cpu=0
# Note that this creates CPU 0 as the general processor that runs
# everything and all other CPUs are assigned to the shield. This
# is a typical simple shielding setup. Adjust if your needs are
# different.
# For shielding kernel threads as well, use the -k switch below instead
# of the shield command above.
#$CSET_BIN shield --cpu=0 -k
##
#### Example 2: using the set and proc subcommands
##
# To set up the exact same with the set and proc commands, use the
# following commands.
# Note that the CPUs are defined in the CSET_SYSTEM and
# CSET_USER variables defined at the begining of this file.
# Also you are not limited to call these cpusets "system" and
# "user", you can call them anything, just be sure to be
# consistent with the names in this script.
#$CSET_BIN set --set=system --cpu=$CSET_SYSTEM
#$CSET_BIN set --set=user --cpu=$CSET_USER
# And to shield kernel threads, add the following command.
#$CSET_BIN proc --move --kthread --fromset=root --toset=system
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down cpuset "
##
#### Example 1: using the shield command
##
# To turn the shield off, we use the reset switch to shield. This
# will move all tasks to the root cpuset and then remove both user
# and system cpusets.
#CSET_BIN shield --reset
##
#### Example 2: using the set and proc subcommands
##
# Note that we can simply remove the cpusets which will automatically
# move the tasks in those cpusets to their parents; however, manually
# moving tasks first gives more flexibility to more complex cpuset
# configurations.
#$CSET_BIN proc --move --kthread --force --fromset=system --toset=root
#$CSET_BIN proc --move --kthread --force --fromset=user --toset=root
# And now, destroy the cpusets
#$CSET_BIN set --set=system --destroy
#$CSET_BIN set --set=user --destroy
# Remember status and be verbose
rc_status -v
;;
status)
echo -n "Checking for service cpuset "
# This command simply shows which cpusets are set up and how many
# tasks are running in them.
$CSET_BIN set --recurse
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit

@ -1,12 +1,23 @@
.\" ** 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" "1" "02/25/2009" "" ""
'\" t
.\" Title: cset
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 12/02/2009
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CSET" "1" "12/02/2009" "[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 \- manage cpusets functions in the Linux kernel
.SH "SYNOPSIS"
@ -17,83 +28,126 @@ cset \- manage cpusets functions in the Linux kernel
\fIcset\fR [cset options] <command> [command options] [args]
.fi
.SH "DESCRIPTION"
.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
In general, you need to have root permissions to run cset. The tool mounts the cpusets filesystem and manipulates it. Non\-root users do not have permission for these actions.
Cpuset is a Python application to make using the cpusets facilities in the Linux kernel easier. The actual included command is called \fIcset\fR and it allows manipulation of cpusets on the system and provides higher level functions such as implementation and control of a basic cpu shielding setup.
.SS "Typical uses of cpuset include"
.TP
.ps -1
.br
In general, you need to have root permissions to run cset\&. The tool mounts the cpusets filesystem and manipulates it\&. Non\-root users do not have permission for these actions\&.
.sp .5v
.RE
Cset is a Python application to make using the cpusets facilities in the Linux kernel easier\&. The actual included command is called \fIcset\fR and it allows manipulation of cpusets on the system and provides higher level functions such as implementation and control of a basic cpu shielding setup\&.
.SS "Typical uses of cset include"
.PP
Setting up and managing a simple shielded CPU environment
The concept of \fIshielded\fR cpus is that a certain number of cpus are partitioned off on the system and only processes that are of interest are run on these cpus (i.e., inside the shield).
.RS 4
The concept of \fIshielded\fR cpus is that a certain number of cpus are partitioned off on the system and only processes that are of interest are run on these cpus (i\&.e\&., inside the shield)\&.
For a simple shielded configuration, one typically uses three cpusets: the root set, a system set and a user set. \fICset\fR includes a super command that implements this strategy and lets you easily manage it. See \fIcset\-shield(1)\fR for more details.
.TP
For a simple shielded configuration, one typically uses three cpusets: the root set, a system set and a user set\&. \fICset\fR includes a super command that implements this strategy and lets you easily manage it\&. See \fIcset\-shield(1)\fR for more details\&.
.RE
.PP
Setting up and managing a complex shielding environment
Shielding can be more complex of course where concepts such as priority cpusets and intersecting cpuset can be used. You can use \fIcset\fR to help manage this type of shielding as well. You will need to use the \fIcset\-set(1)\fR and \fIcset\-proc(1)\fR subcommands directly to do that.
.TP
.RS 4
Shielding can be more complex of course where concepts such as priority cpusets and intersecting cpuset can be used\&. You can use \fIcset\fR to help manage this type of shielding as well\&. You will need to use the \fIcset\-set(1)\fR and \fIcset\-proc(1)\fR subcommands directly to do that\&.
.RE
.PP
Managing cpusets on the system
The cset subcommand \fIcset\-set(1)\fR allows you to create and destroy arbitrary cpusets on the system and assign arbitrary cpus and memory nodes to them. The cpusets so created have to follow the Linux kernel cpuset rules. See the \fIcset\-set(1)\fR subcommand for more details.
.TP
.RS 4
The cset subcommand \fIcset\-set(1)\fR allows you to create and destroy arbitrary cpusets on the system and assign arbitrary cpus and memory nodes to them\&. The cpusets so created have to follow the Linux kernel cpuset rules\&. See the \fIcset\-set(1)\fR subcommand for more details\&.
.RE
.PP
Managing processes that run on various system cpusets
The cset subcommand \fIcset\-proc(1)\fR allows you to manage processes running on various cpusets created on the system. You can exec new processes in specific cpusets and move tasks around existing cpusets. See the \fIcset\-proc(1)\fR subcommand for more details.
.RS 4
The cset subcommand \fIcset\-proc(1)\fR allows you to manage processes running on various cpusets created on the system\&. You can exec new processes in specific cpusets and move tasks around existing cpusets\&. See the \fIcset\-proc(1)\fR subcommand for more details\&.
.RE
.SH "OPTIONS"
The following generic option flags are available. Additional options are available per\-command, and documented in the command\-specific documentation.
.TP
The following generic option flags are available\&. Additional options are available per\-command, and documented in the command\-specific documentation\&.
.PP
\fIcset\fR \-\-version
Display version information and exits.
.TP
.RS 4
Display version information and exits\&.
.RE
.PP
\fIcset\fR \-\-help
Prints the synopsis and a list of all commands.
.TP
.RS 4
Prints the synopsis and a list of all commands\&.
.RE
.PP
\fIcset\fR \-\-log <filename>
Creates a log file for the current run. All manner of useful information is stored in this file. This is usually used to debug cpuset when things don\(cqt go as planned.
.TP
.RS 4
Creates a log file for the current run\&. All manner of useful information is stored in this file\&. This is usually used to debug cset when things don\(cqt go as planned\&.
.RE
.PP
\fIcset\fR \-\-machine
Makes cset output information for all operations in a format that is machine readable (i.e. easy to parse).
.TP
.RS 4
Makes cset output information for all operations in a format that is machine readable (i\&.e\&. easy to parse)\&.
.RE
.PP
\fIcset\fR \-\-tohex <CPUSPEC>
Converts a CPUSPEC (see \fIcset\-set(1)\fR for definition) to a hexadecimal number and outputs it. Useful for setting IRQ stub affinity to a cpuset definition.
.SH "CPUSET COMMANDS"
The cpuset commands are divided into groups, according to the primary purpose of those commands. Following is a short description of each command. A more detailed description is available in individual command manpages. Those manpages are named \fIcset\-<command>(1)\fR. The first command, \fIhelp\fR, is especially useful as it prints out a long summary of what a particular command does.
.TP
.RS 4
Converts a CPUSPEC (see \fIcset\-set(1)\fR for definition) to a hexadecimal number and outputs it\&. Useful for setting IRQ stub affinity to a cpuset definition\&.
.RE
.SH "CSET COMMANDS"
The cset commands are divided into groups, according to the primary purpose of those commands\&. Following is a short description of each command\&. A more detailed description is available in individual command manpages\&. Those manpages are named \fIcset\-<command>(1)\fR\&. The first command, \fIhelp\fR, is especially useful as it prints out a long summary of what a particular command does\&.
.PP
\fIcset help command\fR
.RS 4
print out a lengthy summary of how the specified subcommand works
.TP
.RE
.PP
\fIcset command \-\-help\fR
.RS 4
print out an extended synopsis of the specified subcommand
.TP
.RE
.PP
\fIcset shield\fR
.RS 4
supercommand to set up and manage basic shielding (see \fIcset\-shield(1)\fR)
.TP
.RE
.PP
\fIcset set\fR
.RS 4
create, modify and destroy cpusets (see \fIcset\-set(1)\fR)
.TP
.RE
.PP
\fIcset proc\fR
.RS 4
create and manage processes within cpusets (see \fIcset\-proc(1)\fR)
.RE
.SH "PERSISTENT CPUSETS"
To create a persistent cpuset setup, i\&.e\&. one that survives a reboot, you need to create the file \fI/etc/init\&.d/cset\fR\&. This distribuition of cset includes an example cset init\&.d file found in \fI/usr/share/doc/pacakges/cpuset\fR which is called \fIcset\&.init\&.d\fR\&. You will need to alter the file to your specifications and copy it to be the file \fI/etc/init\&.d/cset\fR\&. See the comments in that file for more details\&.
.SH "FILES"
Cpuset uses a configuration file if present on the system. The file is \fI/etc/cset.conf\fR and may contain the following options.
.TP
If used, the init\&.d script \fI/etc/init\&.d/cset\fR starts and stops a cpuset configuration on boot and poweroff\&.
Cpuset uses a configuration file if present on the system\&. The file is \fI/etc/cset\&.conf\fR and may contain the following options\&.
.PP
mountpoint = <directory_name>
Specify the mountpoint where the cpuset filesystem is to be mounted. By default this is \fI/cpusets\fR; however, some people prefer to mount this in the more traditional \fI/dev/cpusets\fR.
.RS 4
Specify the mountpoint where the cpuset filesystem is to be mounted\&. By default this is \fI/cpusets\fR; however, some people prefer to mount this in the more traditional \fI/dev/cpusets\fR\&.
.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\-2009 Novell Inc\&.
.SH "AUTHOR"
Written by Alex Tsariounov <alext@novell.com>
Written by Alex Tsariounov <alext@novell\&.com>
Some substrate code and ideas were taken from the excellent Stacked GIT (stgit) v0.13 (see http://gna.org/projects/stgit and http://www.procode.org/stgit). Stacked GIT is under GPL V2 or later.
Some substrate code and ideas were taken from the excellent Stacked GIT (stgit) v0\&.13 (see http://gna\&.org/projects/stgit and http://www\&.procode\&.org/stgit)\&. Stacked GIT is under GPL V2 or later\&.
.SH "SEE ALSO"
cset\-set(1), cset\-proc(1), cset\-shield(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
/usr/share/doc/packages/cpuset/html/tutorial\&.html
/usr/share/doc/packages/cpuset/cset\&.init\&.d
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(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(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> [--version | --help | --tohex]
@ -428,12 +433,12 @@ tool mounts the cpusets filesystem and manipulates it. Non-root users
do not have permission for these actions.</td>
</tr></table>
</div>
<div class="paragraph"><p>Cpuset is a Python application to make using the cpusets facilities in
<div class="paragraph"><p>Cset is a Python application to make using the cpusets facilities in
the Linux kernel easier. The actual included command is called <em>cset</em>
and it allows manipulation of cpusets on the system and provides
higher level functions such as implementation and control of a basic
cpu shielding setup.</p></div>
<h3 id="_typical_uses_of_cpuset_include">Typical uses of cpuset include</h3><div style="clear:left"></div>
<h3 id="_typical_uses_of_cset_include">Typical uses of cset include</h3><div style="clear:left"></div>
<div class="dlist"><dl>
<dt class="hdlist1">
Setting up and managing a simple shielded CPU environment
@ -516,7 +521,7 @@ documentation.</p></div>
<p>
Creates a log file for the current run. All manner of useful
information is stored in this file. This is usually used to
debug cpuset when things don&#8217;t go as planned.
debug cset when things don&#8217;t go as planned.
</p>
</dd>
<dt class="hdlist1">
@ -540,9 +545,9 @@ documentation.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_cpuset_commands">CPUSET COMMANDS</h2>
<h2 id="_cset_commands">CSET COMMANDS</h2>
<div class="sectionbody">
<div class="paragraph"><p>The cpuset commands are divided into groups, according to the primary
<div class="paragraph"><p>The cset commands are divided into groups, according to the primary
purpose of those commands. Following is a short description of each
command. A more detailed description is available in individual
command manpages. Those manpages are named <em>cset-&lt;command&gt;(1)</em>. The
@ -594,8 +599,20 @@ summary of what a particular command does.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_persistent_cpusets">PERSISTENT CPUSETS</h2>
<div class="sectionbody">
<div class="paragraph"><p>To create a persistent cpuset setup, i.e. one that survives a reboot,
you need to create the file <em>/etc/init.d/cset</em>. This distribuition of
cset includes an example cset init.d file found in
<em>/usr/share/doc/pacakges/cpuset</em> which is called <em>cset.init.d</em>. You
will need to alter the file to your specifications and copy it to be
the file <em>/etc/init.d/cset</em>. See the comments in that file for more
details.</p></div>
</div>
<h2 id="_files">FILES</h2>
<div class="sectionbody">
<div class="paragraph"><p>If used, the init.d script <em>/etc/init.d/cset</em> starts and stops a
cpuset configuration on boot and poweroff.</p></div>
<div class="paragraph"><p>Cpuset uses a configuration file if present on the system. The file
is <em>/etc/cset.conf</em> and may contain the following options.</p></div>
<div class="dlist"><dl>
@ -630,13 +647,14 @@ http://www.procode.org/stgit). Stacked GIT is under GPL V2 or later.</p></div>
<div class="sectionbody">
<div class="paragraph"><p>cset-set(1), cset-proc(1), cset-shield(1)</p></div>
<div class="paragraph"><p>/usr/share/doc/packages/cpuset/html/tutorial.html</p></div>
<div class="paragraph"><p>/usr/share/doc/packages/cpuset/cset.init.d</p></div>
<div class="paragraph"><p>taskset(1), chrt(1)</p></div>
<div class="paragraph"><p>/usr/src/linux/Documentation/cpusets.txt</p></div>
</div>
<div id="footer">
<div id="footer-text">
Version 1.0<br />
Last updated 2009-02-25 12:42:05 MDT
Version 1.5.2<br />
Last updated 2009-12-02 14:07:17 MDT
</div>
</div>
</body>

@ -1,7 +1,7 @@
cset(1)
======
Alex Tsariounov <alext@novell.com>
v1.0, May 2008
v1.5.2, December 2009
NAME
----
@ -20,14 +20,14 @@ NOTE: In general, you need to have root permissions to run cset. The
tool mounts the cpusets filesystem and manipulates it. Non-root users
do not have permission for these actions.
Cpuset is a Python application to make using the cpusets facilities in
Cset is a Python application to make using the cpusets facilities in
the Linux kernel easier. The actual included command is called 'cset'
and it allows manipulation of cpusets on the system and provides
higher level functions such as implementation and control of a basic
cpu shielding setup.
Typical uses of cpuset include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Typical uses of cset include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setting up and managing a simple shielded CPU environment::
The concept of 'shielded' cpus is that a certain number of
@ -75,7 +75,7 @@ documentation.
'cset' --log <filename>::
Creates a log file for the current run. All manner of useful
information is stored in this file. This is usually used to
debug cpuset when things don't go as planned.
debug cset when things don't go as planned.
'cset' --machine::
Makes cset output information for all operations in a format
@ -86,9 +86,9 @@ documentation.
hexadecimal number and outputs it. Useful for setting IRQ
stub affinity to a cpuset definition.
CPUSET COMMANDS
---------------
The cpuset commands are divided into groups, according to the primary
CSET COMMANDS
-------------
The cset commands are divided into groups, according to the primary
purpose of those commands. Following is a short description of each
command. A more detailed description is available in individual
command manpages. Those manpages are named 'cset-<command>(1)'. The
@ -110,8 +110,21 @@ summary of what a particular command does.
create and manage processes within cpusets (see
'cset-proc(1)')
PERSISTENT CPUSETS
------------------
To create a persistent cpuset setup, i.e. one that survives a reboot,
you need to create the file '/etc/init.d/cset'. This distribuition of
cset includes an example cset init.d file found in
'/usr/share/doc/pacakges/cpuset' which is called 'cset.init.d'. You
will need to alter the file to your specifications and copy it to be
the file '/etc/init.d/cset'. See the comments in that file for more
details.
FILES
-----
If used, the init.d script '/etc/init.d/cset' starts and stops a
cpuset configuration on boot and poweroff.
Cpuset uses a configuration file if present on the system. The file
is '/etc/cset.conf' and may contain the following options.
@ -142,6 +155,8 @@ cset-set(1), cset-proc(1), cset-shield(1)
/usr/share/doc/packages/cpuset/html/tutorial.html
/usr/share/doc/packages/cpuset/cset.init.d
taskset(1), chrt(1)
/usr/src/linux/Documentation/cpusets.txt

Loading…
Cancel
Save