summaryrefslogtreecommitdiff
path: root/tools/virtio/ringtest/run-on-all.sh
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-06-16 01:55:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-06-16 01:55:49 (GMT)
commit78ae255f7891d41fe4ed492f270fe663f4b261af (patch)
tree0b0b6d46505e6397fdf9deaab0a92b1800c96d2d /tools/virtio/ringtest/run-on-all.sh
parent90effdcd2b8a39927aace655c72088a62911e8e1 (diff)
parent139ab4d4e68b8cf2a611b06c006a2195dc6bedf1 (diff)
downloadlinux-78ae255f7891d41fe4ed492f270fe663f4b261af.tar.xz
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio docs and tests from Michael Tsirkin: "This merely has some documentation and a new test, seems safe to merge" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: add noring tool tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu tools/virtio/ringtest: add usage example to README MAINTAINERS: Add file patterns for virtio device tree bindings
Diffstat (limited to 'tools/virtio/ringtest/run-on-all.sh')
-rwxr-xr-xtools/virtio/ringtest/run-on-all.sh4
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 52b0f71..2e69ca8 100755
--- a/tools/virtio/ringtest/run-on-all.sh
+++ b/tools/virtio/ringtest/run-on-all.sh
@@ -3,10 +3,10 @@
#use last CPU for host. Why not the first?
#many devices tend to use cpu0 by default so
#it tends to be busier
-HOST_AFFINITY=$(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n|tail -1)
+HOST_AFFINITY=$(lscpu -p=cpu | tail -1)
#run command on all cpus
-for cpu in $(cd /dev/cpu; ls|grep -v '[a-z]'|sort -n);
+for cpu in $(seq 0 $HOST_AFFINITY)
do
#Don't run guest and host on same CPU
#It actually works ok if using signalling