Skip to content

Commit

Permalink
selftests/vm: run_vmtests.sh: update and clean up gup_test invocation
Browse files Browse the repository at this point in the history
Run benchmarks on the _fast variants of gup and pup, as originally
intended.

Run the new gup_test sub-test: dump pages.  In addition to exercising the
dump_page() call, it also demonstrates the various options you can use to
specify which pages to dump, and how.

Link: https://lkml.kernel.org/r/20201026064021.3545418-8-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Ralph Campbell <rcampbell@nvidia.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 f4f9bda commit d943fe8
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions tools/testing/selftests/vm/run_vmtests
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,33 @@ else
echo "[PASS]"
fi

echo "--------------------------------------------"
echo "running 'gup_test -U' (normal/slow gup)"
echo "--------------------------------------------"
./gup_test -U
echo "------------------------------------------------------"
echo "running: gup_test -u # get_user_pages_fast() benchmark"
echo "------------------------------------------------------"
./gup_test -u
if [ $? -ne 0 ]; then
echo "[FAIL]"
exitcode=1
else
echo "[PASS]"
fi

echo "------------------------------------------"
echo "running gup_test -b (pin_user_pages)"
echo "------------------------------------------"
./gup_test -b
echo "------------------------------------------------------"
echo "running: gup_test -a # pin_user_pages_fast() benchmark"
echo "------------------------------------------------------"
./gup_test -a
if [ $? -ne 0 ]; then
echo "[FAIL]"
exitcode=1
else
echo "[PASS]"
fi

echo "------------------------------------------------------------"
echo "# Dump pages 0, 19, and 4096, using pin_user_pages:"
echo "running: gup_test -ct -F 0x1 0 19 0x1000 # dump_page() test"
echo "------------------------------------------------------------"
./gup_test -ct -F 0x1 0 19 0x1000
if [ $? -ne 0 ]; then
echo "[FAIL]"
exitcode=1
Expand Down

0 comments on commit d943fe8

Please sign in to comment.