diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-07-07 22:42:27 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-07-20 22:45:51 +0200 |
commit | a3d794129e34dcd2b9757e0ff44b97429fd369a0 (patch) | |
tree | 437f0e8228e368fad30e0412847997a709f21ab6 /tools/testing | |
parent | torture: Move parse-console.sh call to PATH-aware scripts (diff) | |
download | linux-a3d794129e34dcd2b9757e0ff44b97429fd369a0.tar.xz linux-a3d794129e34dcd2b9757e0ff44b97429fd369a0.zip |
torture: Put kvm.sh batch-creation awk script into a temp file
This commit is a first step towards pinning guest-OS vCPUs so as
to force latency differences, especially on multi-socket systems.
The kvm.sh script puts its batch-creation awk script into a temporary
file so that later commits can add the awk code needed to dole out CPUs
so as to maximize latency differences. This awk code will be used by
multiple scripts.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/selftests/rcutorture/bin/kvm.sh | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index b4ac4ee33222..0f26a81599f5 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -430,17 +430,8 @@ then git diff HEAD >> $resdir/$ds/testid.txt fi ___EOF___ -awk < $T/cfgcpu.pack \ - -v TORTURE_BUILDONLY="$TORTURE_BUILDONLY" \ - -v CONFIGDIR="$CONFIGFRAG/" \ - -v KVM="$KVM" \ - -v ncpus=$cpus \ - -v jitter="$jitter" \ - -v rd=$resdir/$ds/ \ - -v dur=$dur \ - -v TORTURE_QEMU_ARG="$TORTURE_QEMU_ARG" \ - -v TORTURE_BOOTARGS="$TORTURE_BOOTARGS" \ -'BEGIN { +cat << '___EOF___' > $T/dumpbatches.awk +BEGIN { i = 0; } @@ -560,7 +551,19 @@ END { # Dump the last batch. if (ncpus != 0) dump(first, i, batchnum); -}' >> $T/script +} +___EOF___ +awk < $T/cfgcpu.pack \ + -v TORTURE_BUILDONLY="$TORTURE_BUILDONLY" \ + -v CONFIGDIR="$CONFIGFRAG/" \ + -v KVM="$KVM" \ + -v ncpus=$cpus \ + -v jitter="$jitter" \ + -v rd=$resdir/$ds/ \ + -v dur=$dur \ + -v TORTURE_QEMU_ARG="$TORTURE_QEMU_ARG" \ + -v TORTURE_BOOTARGS="$TORTURE_BOOTARGS" \ + -f $T/dumpbatches.awk >> $T/script echo kvm-end-run-stats.sh "$resdir/$ds" "$starttime" >> $T/script # Extract the tests and their batches from the script. |