aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-09-15 18:08:09 +0000
committerBill Nottingham <notting@redhat.com>2006-09-15 18:08:09 +0000
commitd785191f52a36e283d910bac453b65b6890431c5 (patch)
tree8fd075f8d16d89d621d139b17b754f82a0f922f4
parent2359f54331a07dce99b471f6433760d9442adf25 (diff)
downloadinitscripts-d785191f52a36e283d910bac453b65b6890431c5.tar
initscripts-d785191f52a36e283d910bac453b65b6890431c5.tar.gz
initscripts-d785191f52a36e283d910bac453b65b6890431c5.tar.bz2
initscripts-d785191f52a36e283d910bac453b65b6890431c5.tar.xz
initscripts-d785191f52a36e283d910bac453b65b6890431c5.zip
set default affinity if specified (#203359)
-rwxr-xr-xrc.d/rc.sysinit11
1 files changed, 11 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 930787c1..eb9d934f 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -314,6 +314,17 @@ fi
touch /dev/.in_sysinit >/dev/null 2>&1
+# Set default affinity
+if [ -x /bin/taskset ]; then
+ if strstr "$cmdline" default_affinity= ; then
+ for arg in $cmdline ; do
+ if [ "${arg##default_affinity=}" != "${arg}" ]; then
+ /bin/taskset -p ${arg##default_affinity=} 1
+ fi
+ done
+ fi
+fi
+
nashpid=$(pidof nash 2>/dev/null)
[ -n "$nashpid" ] && kill $nashpid >/dev/null 2>&1
unset nashpid