Skip to content

Commit 822e425

Browse files
committed
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 <[email protected]>
1 parent 06c2afb commit 822e425

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/selftests/rcutorture/bin/torture.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,10 @@ fi
376376

377377
if test "$do_scftorture" = "yes"
378378
then
379+
# Scale memory based on the number of CPUs.
380+
scfmem=$((2+HALF_ALLOTED_CPUS/16))
379381
torture_bootargs="scftorture.nthreads=$HALF_ALLOTED_CPUS torture.disable_onoff_at_boot csdlock_debug=1"
380-
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
382+
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
381383
fi
382384

383385
if test "$do_rt" = "yes"

0 commit comments

Comments
 (0)