Commit d943fe81 authored by John Hubbard's avatar John Hubbard Committed by Linus Torvalds

selftests/vm: run_vmtests.sh: update and clean up gup_test invocation

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.comSigned-off-by: default avatarJohn 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f4f9bda4
...@@ -123,10 +123,10 @@ else ...@@ -123,10 +123,10 @@ else
echo "[PASS]" echo "[PASS]"
fi fi
echo "--------------------------------------------" echo "------------------------------------------------------"
echo "running 'gup_test -U' (normal/slow gup)" echo "running: gup_test -u # get_user_pages_fast() benchmark"
echo "--------------------------------------------" echo "------------------------------------------------------"
./gup_test -U ./gup_test -u
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
exitcode=1 exitcode=1
...@@ -134,10 +134,22 @@ else ...@@ -134,10 +134,22 @@ else
echo "[PASS]" echo "[PASS]"
fi fi
echo "------------------------------------------" echo "------------------------------------------------------"
echo "running gup_test -b (pin_user_pages)" echo "running: gup_test -a # pin_user_pages_fast() benchmark"
echo "------------------------------------------" echo "------------------------------------------------------"
./gup_test -b ./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 if [ $? -ne 0 ]; then
echo "[FAIL]" echo "[FAIL]"
exitcode=1 exitcode=1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment