Skip to content

Commit

Permalink
selftests/vm: 2x speedup for run_vmtests.sh
Browse files Browse the repository at this point in the history
Each invocation of userfaultfd for "anon" and "shmem" was taking about
6.5 sec to run, contributing to an overall run time of about 22 sec for
run_vmtests.sh.

Reduce the size and bounce input values to the userfaultfd invocation
within run_vmtests.sh, enough to get each invocation down to about 1.0
sec. This should still provide a reasonable smoke test, while staying
within a nominal time budget of around 1 second or so per test. And this
brings the overall running time of run_vmtests.sh down to 11 second.

Link: https://lkml.kernel.org/r/20201026064021.3545418-10-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
John Hubbard authored and Linus Torvalds committed Dec 15, 2020
1 parent f3a4570 commit a26c4c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/selftests/vm/run_vmtests
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ fi
echo "-------------------"
echo "running userfaultfd"
echo "-------------------"
./userfaultfd anon 128 32
./userfaultfd anon 20 16
if [ $? -ne 0 ]; then
echo "[FAIL]"
exitcode=1
Expand All @@ -185,7 +185,7 @@ rm -f $mnt/ufd_test_file
echo "-------------------------"
echo "running userfaultfd_shmem"
echo "-------------------------"
./userfaultfd shmem 128 32
./userfaultfd shmem 20 16
if [ $? -ne 0 ]; then
echo "[FAIL]"
exitcode=1
Expand Down

0 comments on commit a26c4c6

Please sign in to comment.