diff options
Diffstat (limited to 'tools/virtio/ringtest/run-on-all.sh')
| -rwxr-xr-x | tools/virtio/ringtest/run-on-all.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/virtio/ringtest/run-on-all.sh b/tools/virtio/ringtest/run-on-all.sh index 52b0f71ffa8d..2e69ca812b4c 100755 --- a/tools/virtio/ringtest/run-on-all.sh +++ b/tools/virtio/ringtest/run-on-all.sh | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | #use last CPU for host. Why not the first? | 3 | #use last CPU for host. Why not the first? |
| 4 | #many devices tend to use cpu0 by default so | 4 | #many devices tend to use cpu0 by default so |
| 5 | #it tends to be busier | 5 | #it tends to be busier |
| 6 | HOST_AFFINITY=$(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n|tail -1) | 6 | HOST_AFFINITY=$(lscpu -p=cpu | tail -1) |
| 7 | 7 | ||
| 8 | #run command on all cpus | 8 | #run command on all cpus |
| 9 | for cpu in $(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n); | 9 | for cpu in $(seq 0 $HOST_AFFINITY) |
| 10 | do | 10 | do |
| 11 | #Don't run guest and host on same CPU | 11 | #Don't run guest and host on same CPU |
| 12 | #It actually works ok if using signalling | 12 | #It actually works ok if using signalling |
