diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-21 13:27:22 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-21 13:27:22 -0300 |
commit | f1c92c8cad34b0e04031b3dcc1412c215f9c47b8 (patch) | |
tree | bdee1089c600536836f776c175c6056dc3b44f8f | |
parent | acb1b3a9c3f09a4c816276d24238119bbdd45a7b (diff) | |
download | tuna-f1c92c8cad34b0e04031b3dcc1412c215f9c47b8.tar.gz |
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 <acme@redhat.com>
-rwxr-xr-x | testuna | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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 |