Skip to content

selftests/vm: gup_test, hmm-tests, assorted improvements

John Hubbard linux-kselftest linux-mm lkml 3 versions – Applied

Status from this message: [merged] selftests-vm-rename-run_vmtests-run_vmtestssh.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 0 repliesApplied 9/9
  2. v28 patches 2 repliesSuperseded
  3. v18 patches 19 repliesSuperseded

Patches in v3 All 9 applied

#Subject and filesSizeRepliesApplied
1/9mm/gup_benchmark: rename to mm/gup_testDocumentation/core-api/pin_user_pages.rst arch/s390/configs/debug_defconfig arch/s390/configs/defconfig +8 more+49 -440 repliesApplied
2/9selftests/vm: use a common gup_test.hmm/gup_test.c mm/gup_test.h tools/testing/selftests/vm/Makefile +1 more+26 -370 repliesApplied
3/9selftests/vm: rename run_vmtests --> run_vmtests.shtools/testing/selftests/vm/Makefile tools/testing/selftests/vm/run_vmtests.sh+1 -10 repliesApplied
4/9selftests/vm: minor cleanup: Makefile and gup_test.ctools/testing/selftests/vm/Makefile tools/testing/selftests/vm/gup_test.c+4 -70 repliesApplied
5/9selftests/vm: only some gup_test items are really benchmarksDocumentation/core-api/pin_user_pages.rst mm/gup_test.c mm/gup_test.h +1 more+51 -200 repliesApplied
6/9selftests/vm: gup_test: introduce the dump_pages() sub-testmm/Kconfig mm/gup_test.c mm/gup_test.h +1 more+113 -40 repliesApplied
7/9selftests/vm: run_vmtests.sh: update and clean up gup_test invocationtools/testing/selftests/vm/run_vmtests.sh+20 -80 repliesApplied
8/9selftests/vm: hmm-tests: remove the libhugetlbfs dependencytools/testing/selftests/vm/.gitignore tools/testing/selftests/vm/Makefile tools/testing/selftests/vm/check_config.sh +1 more+63 -30 repliesApplied
9/9selftests/vm: 2x speedup for run_vmtests.shtools/testing/selftests/vm/run_vmtests.sh+2 -20 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/9] selftests/vm: gup_test, hmm-tests, assorted improvements

Hi,

Reposting for -rc1, with some fixes, and an additional path at the end, too. I've swept through and looked for problems, as well.

Changes since v2 [1]:

* Rebased onto 5.10-rc1

* Fixed an improper ".." include path, indentified by Linus [2].

* Added an "if (cmd == DUMP_USER_PAGES_TEST)" guard to invoking dump_pages_test(). Before, it worked, but it's too subtle to depend merely on struct gup_test.which_pages[] being zeroed out, in order to avoid dumping pages that are not requested to be dumped.

* Added a patch to the end: 2x speedup for run_vmtests.sh

* Tweaked some commit logs and comments slightly

Original cover letter, edited slightly:

Summary: This series provides two main things, and a number of smaller supporting goodies. The two main points are:

1) Add a new sub-test to gup_test, which in turn is a renamed version of gup_benchmark. This sub-test allows nicer testing of dump_pages(), at least on user-space pages.

For quite a while, I was doing a quick hack to gup_test.c whenever I wanted to try out changes to dump_page(). Then Matthew Wilcox asked me what I meant when I said "I used my dump_page() unit test", and I realized that it might be nice to check in a polished up version of that.

Details about how it works and how to use it are in the commit description for patch #6 ("selftests/vm: gup_test: introduce the dump_pages() sub-test").

2) Fixes a limitation of hmm-tests: these tests are incredibly useful, but only if people actually build and run them. And it turns out that libhugetlbfs is a little too effective at throwing a wrench in the works, there. So I've added a little configuration check that removes just two of the 21 hmm-tests, if libhugetlbfs is not available.

Further details in the commit description of patch #8 ("selftests/vm:
hmm-tests: remove the libhugetlbfs dependency").

Other smaller things that this series does:

a) Remove code duplication by creating gup_test.h.

b) Clear up the sub-test organization, and their invocation within run_vmtests.sh.

c) Other minor assorted improvements.

[1] v2 is here:
https://lore.kernel.org/linux-doc/[email protected]/

[2] https://lore.kernel.org/r/CAHk-=wgh-TMPHLY3jueHX7Y2fWh3D+nMBqVS__AZm6-oorquWA@mail.gmail.com

John Hubbard (9):
mm/gup_benchmark: rename to mm/gup_test
selftests/vm: use a common gup_test.h
selftests/vm: rename run_vmtests --> run_vmtests.sh selftests/vm: minor cleanup: Makefile and gup_test.c selftests/vm: only some gup_test items are really benchmarks selftests/vm: gup_test: introduce the dump_pages() sub-test selftests/vm: run_vmtests.sh: update and clean up gup_test invocation selftests/vm: hmm-tests: remove the libhugetlbfs dependency selftests/vm: 2x speedup for run_vmtests.sh

 Documentation/core-api/pin_user_pages.rst     |   6 +-
 arch/s390/configs/debug_defconfig             |   2 +-
 arch/s390/configs/defconfig                   |   2 +-
 mm/Kconfig                                    |  21 +-
 mm/Makefile                                   |   2 +-
 mm/{gup_benchmark.c => gup_test.c}            | 111 ++++++----
 mm/gup_test.h                                 |  32 +++
 tools/testing/selftests/vm/.gitignore         |   3 +-
 tools/testing/selftests/vm/Makefile           |  38 +++-
 tools/testing/selftests/vm/check_config.sh    |  31 +++
 tools/testing/selftests/vm/config             |   2 +-
 tools/testing/selftests/vm/gup_benchmark.c    | 143 -------------
 tools/testing/selftests/vm/gup_test.c         | 194 ++++++++++++++++++
 tools/testing/selftests/vm/hmm-tests.c        |  10 +-
 .../vm/{run_vmtests => run_vmtests.sh}        |  32 ++-
 15 files changed, 416 insertions(+), 213 deletions(-)
 rename mm/{gup_benchmark.c => gup_test.c} (60%)
 create mode 100644 mm/gup_test.h
 create mode 100644 tools/testing/selftests/vm/check_config.sh
 delete mode 100644 tools/testing/selftests/vm/gup_benchmark.c
 create mode 100644 tools/testing/selftests/vm/gup_test.c
 rename tools/testing/selftests/vm/{run_vmtests => run_vmtests.sh} (88%)

base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec

Signature · 1 line
2.29.0