From f1c92c8cad34b0e04031b3dcc1412c215f9c47b8 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 21 Aug 2008 13:27:22 -0300 Subject: testuna: Don't try to isolate all the processors On a two way system trying to isolate the first and last core doesn't make sense... Signed-off-by: Arnaldo Carvalho de Melo --- testuna | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/testuna b/testuna index 96b4b1c..774911c 100755 --- a/testuna +++ b/testuna @@ -146,15 +146,17 @@ done NEW_AFFINITY=$((1 << NR_PROCESSORS | 1)) -tuna --cpu=0,$NR_PROCESSORS --isolate +if [ $NR_PROCESSORS -gt 2 ]; then + tuna --cpu=0,$NR_PROCESSORS --isolate -for PID in $(cd /proc; ls -d [0-9]*) ; do - [ -n "$(cat /proc/$PID/cmdline 2> /dev/null)" ] || continue - AFFINITY=0x$(get_affinity $PID) || continue + for PID in $(cd /proc; ls -d [0-9]*) ; do + [ -n "$(cat /proc/$PID/cmdline 2> /dev/null)" ] || continue + AFFINITY=0x$(get_affinity $PID) || continue - die_if_not_zero $((AFFINITY & NEW_AFFINITY)) \ - "Verifying isolation of first and last processor for PID $PID" -done + die_if_not_zero $((AFFINITY & NEW_AFFINITY)) \ + "Verifying isolation of first and last processor for PID $PID" + done +fi tuna --cpu=0,$NR_PROCESSORS --include -- cgit 1.2.3-korg