Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.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>

authored by

John Hubbard and committed by
Linus Torvalds
d943fe81 f4f9bda4

+20 -8
+20 -8
tools/testing/selftests/vm/run_vmtests
··· 123 123 echo "[PASS]" 124 124 fi 125 125 126 - echo "--------------------------------------------" 127 - echo "running 'gup_test -U' (normal/slow gup)" 128 - echo "--------------------------------------------" 129 - ./gup_test -U 126 + echo "------------------------------------------------------" 127 + echo "running: gup_test -u # get_user_pages_fast() benchmark" 128 + echo "------------------------------------------------------" 129 + ./gup_test -u 130 130 if [ $? -ne 0 ]; then 131 131 echo "[FAIL]" 132 132 exitcode=1 ··· 134 134 echo "[PASS]" 135 135 fi 136 136 137 - echo "------------------------------------------" 138 - echo "running gup_test -b (pin_user_pages)" 139 - echo "------------------------------------------" 140 - ./gup_test -b 137 + echo "------------------------------------------------------" 138 + echo "running: gup_test -a # pin_user_pages_fast() benchmark" 139 + echo "------------------------------------------------------" 140 + ./gup_test -a 141 + if [ $? -ne 0 ]; then 142 + echo "[FAIL]" 143 + exitcode=1 144 + else 145 + echo "[PASS]" 146 + fi 147 + 148 + echo "------------------------------------------------------------" 149 + echo "# Dump pages 0, 19, and 4096, using pin_user_pages:" 150 + echo "running: gup_test -ct -F 0x1 0 19 0x1000 # dump_page() test" 151 + echo "------------------------------------------------------------" 152 + ./gup_test -ct -F 0x1 0 19 0x1000 141 153 if [ $? -ne 0 ]; then 142 154 echo "[FAIL]" 143 155 exitcode=1