Possible scriping bug in rcutorture/kvm.sh
Subsystems (3)
Joel Fernandes
maintainerHello,
Currently with my ARM machine of 288 CPUs, I am only seeing 56 of them used at a time. Any ideas if this is a bug or I am doing something wrong?
I started a batch of 36 SRCU-P runs, which is exactly 1 batch:
$ sudo tools/testing/selftests/rcutorture/bin/kvm.sh --duration 120 --allcpus --configs "10*SRCU-P" --dryrun batches 1 SRCU-P 8
1 SRCU-P.2 8
1 SRCU-P.3 8
1 SRCU-P.4 8
1 SRCU-P.5 8
1 SRCU-P.6 8
1 SRCU-P.7 8
1 SRCU-P.8 8
1 SRCU-P.9 8
1 SRCU-P.10 8
But, when I run it via:
$ sudo tools/testing/selftests/rcutorture/bin/kvm.sh --duration 240 --cpus 288 --configs "36*SRCU-P"
ps shows me only 7 qemu instances of 8 CPUs each. However, weirdly it is only 1 thread for each instance (thus its not even 56 CPUs, but rather 7 or so).
1496915 root 20 0 1684276 256996 66816 R 90.9 0.2 8:38.06
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496913 root 20 0 1684276 256996 66816 R 89.7 0.2 8:50.53
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496929 root 20 0 1684276 256996 66816 R 89.3 0.2 8:44.53
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496938 root 20 0 1684276 256996 66816 R 82.8 0.2 8:46.03
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496922 root 20 0 1684276 256996 66816 R 82.1 0.2 8:57.83
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496908 root 20 0 1684276 256996 66816 R 81.5 0.2 8:50.59
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496920 root 20 0 1684276 256996 66816 R 63.6 0.2 8:51.46
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
Thanks.
Paul E. McKenney
maintainerQuoted 3 lines · Joel Fernandes
Hello,
Currently with my ARM machine of 288 CPUs, I am only seeing 56 of them used at a time. Any ideas if this is a bug or I am doing something wrong?
I regularly run with 80 CPUs, but perhaps the script's check for the number of CPUs is broken on ARM? It currently relies on this:
getconf _NPROCESSORS_ONLN
(See identify_qemu_vcpus() in functions.sh.)
What should it be doing instead on ARM?
Huh. 56 does not go evenly into 288, either. Search me!
Thanx, Paul
Quoted 57 lines
I started a batch of 36 SRCU-P runs, which is exactly 1 batch:
$ sudo tools/testing/selftests/rcutorture/bin/kvm.sh --duration 120 --allcpus --configs "10*SRCU-P" --dryrun batches 1 SRCU-P 81 SRCU-P.2 8
1 SRCU-P.3 8
1 SRCU-P.4 8
1 SRCU-P.5 8
1 SRCU-P.6 8
1 SRCU-P.7 8
1 SRCU-P.8 8
1 SRCU-P.9 8
1 SRCU-P.10 8
But, when I run it via:
$ sudo tools/testing/selftests/rcutorture/bin/kvm.sh --duration 240 --cpus 288 --configs "36*SRCU-P"ps shows me only 7 qemu instances of 8 CPUs each. However, weirdly it is only 1 thread for each instance (thus its not even 56 CPUs, but rather 7 or so).
1496915 root 20 0 1684276 256996 66816 R 90.9 0.2 8:38.06
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496913 root 20 0 1684276 256996 66816 R 89.7 0.2 8:50.53
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496929 root 20 0 1684276 256996 66816 R 89.3 0.2 8:44.53
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496938 root 20 0 1684276 256996 66816 R 82.8 0.2 8:46.03
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496922 root 20 0 1684276 256996 66816 R 82.1 0.2 8:57.83
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496908 root 20 0 1684276 256996 66816 R 81.5 0.2 8:50.59
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+
1496920 root 20 0 1684276 256996 66816 R 63.6 0.2 8:51.46
qemu-system-aarch64 -enable-kvm -display none -no-reboot -smp 8 -net none -machine virt,gic-version=host -cpu host+Thanks.
Joel Fernandes
maintainerQuoted 5 lines · Paul E. McKenney
Quoted 3 lines · Joel Fernandes
Hello,
Currently with my ARM machine of 288 CPUs, I am only seeing 56 of them used at a time. Any ideas if this is a bug or I am doing something wrong?
Quoted 8 lines
I regularly run with 80 CPUs, but perhaps the script's check for the number of CPUs is broken on ARM? It currently relies on this:
getconf
_NPROCESSORS_ONLN(See
identify_qemu_vcpus()infunctions.sh.)What should it be doing instead on ARM?
I am guessing nothing different because it still gives 288:
$ getconf _NPROCESSORS_ONLN 288
Quoted 2 lines
Huh. 56 does not go evenly into 288, either. Search me!
I think its failing because its only running the first SRCU-P for me and failing for the rest in the batch because:
I see this for the rest of the runs: "Initial build failed, not running KVM":
I think its because this line is failing for ARM because it does not have a bzImage (it instead has Image):
if test "$base_resdir" != "$resdir" && test -f $base_resdir/bzImage && test -f $base_resdir/vmlinux
I'll try this and see if it works (sorry my thunderbird is wrapping the diff..):
(quoted diff) +0 -0
b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh index ad79784e552d..957800c9ffba 100755
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh +0 -1
@@ -73,7 +73,7 @@ config_override_param "$config_dir/CFcommon.$(uname -m)" KcList \ cp $T/KcList $resdir/ConfigFragment base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'` -if test "$base_resdir" != "$resdir" && test -f $base_resdir/bzImage && test -f
$base_resdir/vmlinux
+if test "$base_resdir" != "$resdir" && (test -f $base_resdir/bzImage || test -f $base_resdir/Image) && test -f $base_resdir/vmlinux
then
# Rerunning previous test, so use that test's kernel. QEMU="identify_qemu $base_resdir/vmlinux"
Thanks.