summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/rcutorture
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2023-05-16 16:18:32 +0300
committerPaul E. McKenney <paulmck@kernel.org>2023-07-15 01:02:57 +0300
commit822e42509997cfc8582ab1108eef1a280524b26a (patch)
treea5a37ababe6006f8bdc2f89897964ba120c6bcde /tools/testing/selftests/rcutorture
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
downloadlinux-822e42509997cfc8582ab1108eef1a280524b26a.tar.xz
torture: Scale scftorture memory based on number of CPUs
As the number of CPUs increases, the number of outstanding no-wait smp_call_function() handlers also increases, so that the default of 2G of memory is not always sufficient on 80-CPU systems. This commit therefore scales the amount of memory specified to qemu based on the number of CPUs specified to the scftorture test instance. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/testing/selftests/rcutorture')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/torture.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 5a2ae2264403..9fa6526067f0 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -376,8 +376,10 @@ fi
if test "$do_scftorture" = "yes"
then
+ # Scale memory based on the number of CPUs.
+ scfmem=$((2+HALF_ALLOTED_CPUS/16))
torture_bootargs="scftorture.nthreads=$HALF_ALLOTED_CPUS torture.disable_onoff_at_boot csdlock_debug=1"
- torture_set "scftorture" tools/testing/selftests/rcutorture/bin/kvm.sh --torture scf --allcpus --duration "$duration_scftorture" --configs "$configs_scftorture" --kconfig "CONFIG_NR_CPUS=$HALF_ALLOTED_CPUS" --memory 2G --trust-make
+ torture_set "scftorture" tools/testing/selftests/rcutorture/bin/kvm.sh --torture scf --allcpus --duration "$duration_scftorture" --configs "$configs_scftorture" --kconfig "CONFIG_NR_CPUS=$HALF_ALLOTED_CPUS" --memory ${scfmem}G --trust-make
fi
if test "$do_rt" = "yes"