summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 16:27:02 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 16:27:02 -0700
commitd03a8d064e202a47ab52df7a42b4a0561c45238f (patch)
treed19b831ed1924f7d76288e23ce5e6e0230a0546b
parent9e4f29caffbaf1f633eba9fb9d441835317b9b7a (diff)
downloadvyatta-cfg-system-d03a8d064e202a47ab52df7a42b4a0561c45238f.tar.gz
vyatta-cfg-system-d03a8d064e202a47ab52df7a42b4a0561c45238f.zip
Ignore setting CPU affinity on UP systems
If only one CPU, then not worth bothering doing any kind of interrrupt affinity.
-rw-r--r--templates/interfaces/ethernet/node.tag/smp_affinity/node.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def
index 098287cc..f62ef246 100644
--- a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def
+++ b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def
@@ -29,6 +29,9 @@ syntax:expression: exec " \
fi"
update:
+ if [ $(cat /sys/devices/system/cpu/present) -eq 0 ]; then
+ exit 0
+ fi
if [ "$VAR(@)" = "auto" ]; then
echo "Setting SMP affinity for $VAR(../@) automatically."
sudo /opt/vyatta/sbin/vyatta-auto-irqaffin.pl --setup $VAR(../@)