diff options
author | Bill Nottingham <notting@redhat.com> | 2006-09-15 18:08:09 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2006-09-15 18:08:09 +0000 |
commit | d785191f52a36e283d910bac453b65b6890431c5 (patch) | |
tree | 8fd075f8d16d89d621d139b17b754f82a0f922f4 | |
parent | 2359f54331a07dce99b471f6433760d9442adf25 (diff) | |
download | initscripts-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-x | rc.d/rc.sysinit | 11 |
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 |