From 754434fee29f02326853e656fbf0a6bea5c63ea4 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 12 Sep 2006 12:16:53 +0000 Subject: [PATCH] Apply Jan Rekorajski's CPUSET patch. (http://www.paul.sladen.org/vserver/archives/200511/0245.html) git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2300 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- doc/configuration.xml | 21 ++++++++++++++++++ scripts/vserver-setup.functions | 45 +++++++++++++++++++++++++++++++++++--- scripts/vserver.functions | 48 +++++++++++++++++++++++++++++++++++++++++ scripts/vserver.start | 1 + scripts/vserver.stop | 1 + scripts/vserver.suexec | 1 + 6 files changed, 114 insertions(+), 3 deletions(-) diff --git a/doc/configuration.xml b/doc/configuration.xml index 8866b7a..3b728b6 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -1200,5 +1200,26 @@ tools and can *not* be modified. + + + + The name of the cpuset for this vserver + + + The list of CPUs in this cpuset + + + The list of Memory Nodes in this cpuset + + + Is the CPU assignment exclusive? + + + Is the memory node assignment exclusive? + + + When this file exists, the cpuset will be assumed to exist already + + diff --git a/scripts/vserver-setup.functions b/scripts/vserver-setup.functions index aed47d3..cb484fd 100644 --- a/scripts/vserver-setup.functions +++ b/scripts/vserver-setup.functions @@ -24,11 +24,15 @@ SETUP_LOCKFILE= SETUP_CONFDIR= SETUP_CONTEXT= SETUP_INITSTYLE= +SETUP_CPUSET= +SETUP_CPUSETCPUS= +SETUP_CPUSETMEMS= +SETUP_CPUSETVIRT= declare -a SETUP_INTERFACES=() declare -a SETUP_FLAGS=() -declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" +declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" declare -r SETUP_HELPMSG=$" --context ... the static context of the vserver [default: none; a dynamic context will be assumed] @@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" this becomes a per vserver limit) private: No other process can join this security context. Even root + --cpuset + ... declares the CPUSET this vserver will run in [default: none] + --cpusetcpus ]> + ... sets which cpus belong to the CPUSET, + exclusive is a flag (0|1) prohibiting any other cpuset from + using those cpus + --cpusetmems ]> + ... sets which memory pools belong to the CPUSET, + exclusive is a flag (0|1) prohibiting any other cpuset from + using those memory pools + --cpusetvirt + ... virtualize cpuset (guest will see only CPUs defined in cpuset) + Requires kernel patch from http://www.bullopensource.org/cpuset/ --initstyle