diff mbox series

[7/8] selftests/vm: run_vmtest.sh: update and clean up gup_test invocation

Message ID 20200928062159.923212-8-jhubbard@nvidia.com
State New
Headers show
Series selftests/vm: gup_test, hmm-tests, assorted improvements | expand

Commit Message

John Hubbard Sept. 28, 2020, 6:21 a.m. UTC
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.

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 tools/testing/selftests/vm/run_vmtest.sh | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

Comments

Ira Weiny Sept. 28, 2020, 7:26 p.m. UTC | #1
On Sun, Sep 27, 2020 at 11:21:58PM -0700, John Hubbard wrote:
> 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.
> 
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
>  tools/testing/selftests/vm/run_vmtest.sh | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/testing/selftests/vm/run_vmtest.sh b/tools/testing/selftests/vm/run_vmtest.sh
> index d1843d5f3c30..e3a8b14d9df6 100755
> --- a/tools/testing/selftests/vm/run_vmtest.sh
> +++ b/tools/testing/selftests/vm/run_vmtest.sh
> @@ -124,9 +124,9 @@ else
>  fi
>  
>  echo "--------------------------------------------"
> -echo "running 'gup_test -U' (normal/slow gup)"
> +echo "running 'gup_test -u' (fast gup benchmark)"
>  echo "--------------------------------------------"
> -./gup_test -U
> +./gup_test -u
>  if [ $? -ne 0 ]; then
>  	echo "[FAIL]"
>  	exitcode=1
> @@ -134,10 +134,22 @@ 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 "running gup_test -ct -F 0x1 0 19 0x1000"
> +echo "   Dumps pages 0, 19, and 4096, using pin_user_pages (-F 0x1)"
> +echo "--------------------------------------------------------------"
> +./gup_test -ct -F 0x1 0 19 0x1000

Ah here it is...  Maybe just remove that from the previous commit message.

Ira

>  if [ $? -ne 0 ]; then
>  	echo "[FAIL]"
>  	exitcode=1
> -- 
> 2.28.0
> 
>
John Hubbard Sept. 28, 2020, 7:58 p.m. UTC | #2
On 9/28/20 12:26 PM, Ira Weiny wrote:
> On Sun, Sep 27, 2020 at 11:21:58PM -0700, John Hubbard wrote:
...
>> +echo "--------------------------------------------------------------"
>> +echo "running gup_test -ct -F 0x1 0 19 0x1000"
>> +echo "   Dumps pages 0, 19, and 4096, using pin_user_pages (-F 0x1)"
>> +echo "--------------------------------------------------------------"
>> +./gup_test -ct -F 0x1 0 19 0x1000
> 
> Ah here it is...  Maybe just remove that from the previous commit message.
> 
> Ira

Yes, will do, thanks for spotting that.

thanks,
diff mbox series

Patch

diff --git a/tools/testing/selftests/vm/run_vmtest.sh b/tools/testing/selftests/vm/run_vmtest.sh
index d1843d5f3c30..e3a8b14d9df6 100755
--- a/tools/testing/selftests/vm/run_vmtest.sh
+++ b/tools/testing/selftests/vm/run_vmtest.sh
@@ -124,9 +124,9 @@  else
 fi
 
 echo "--------------------------------------------"
-echo "running 'gup_test -U' (normal/slow gup)"
+echo "running 'gup_test -u' (fast gup benchmark)"
 echo "--------------------------------------------"
-./gup_test -U
+./gup_test -u
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
 	exitcode=1
@@ -134,10 +134,22 @@  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 "running gup_test -ct -F 0x1 0 19 0x1000"
+echo "   Dumps pages 0, 19, and 4096, using pin_user_pages (-F 0x1)"
+echo "--------------------------------------------------------------"
+./gup_test -ct -F 0x1 0 19 0x1000
 if [ $? -ne 0 ]; then
 	echo "[FAIL]"
 	exitcode=1