On 8/13/26 11:42 PM, Sarthak Sharma wrote:
> gup_test.c currently serves two separate purposes: benchmarking
> (GUP_FAST_BENCHMARK, PIN_FAST_BENCHMARK and PIN_LONGTERM_BENCHMARK) and
> functional testing (GUP_BASIC_TEST, PIN_BASIC_TEST and
> DUMP_USER_PAGES_TEST). Keeping both in one program makes the functional
> tests harder to run and report individually, while run_vmtests.sh has to
> invoke the program repeatedly with different options.
> 
> Separate these roles into tools/mm/gup_bench for benchmarking and
> tools/testing/selftests/mm/gup for functional testing. Move the shared
> file and hugepage helpers to tools/lib/mm/ so both programs can use them
> without duplicating the implementation.
> 

It's been a while since I sent it, so just wanted to follow up and see
if anyone has had a chance to look at the series.

While here, I also wanted to address Sashiko's concern.

> --- Patch [4]: [PATCH v7 4/6] tools/mm: move gup_test from selftests/
> mm to tools/mm ---
> commit 92aa92be01707caef105298876458c303c6513c8
> Author: Sarthak Sharma <[email protected]>
> tools/mm: move gup_test from selftests/mm to tools/mm
> This commit moves gup_test.c to gup_bench.c in the tools/mm directory
> to begin separating benchmarking and functional testing components. It
> also updates relevant Makefiles, gitignore, run_vmtests.sh, and
> MAINTAINERS.
>
> tools/mm: move gup_test from selftests/mm to tools/mm
>
> Move tools/testing/selftests/mm/gup_test.c to tools/mm/gup_bench.c.
> This is the first step in separating its benchmarking and
> functional testing components.
> Since the file and binary are being moved and renamed, should we also
> update the references in mm/Kconfig and Documentation/core-api/
> pin_user_pages.rst?
> For example, mm/Kconfig still points to the old path for
> CONFIG_GUP_TEST:
> See tools/testing/selftests/mm/gup_test.c
> And Documentation/core-api/pin_user_pages.rst still references the old
> file and binary name:
> tools/testing/selftests/mm/gup_test.c
> has the following new calls to exercise the new pin*() wrapper
> functions:
>  * PIN_FAST_BENCHMARK (./gup_test -a)
>  * PIN_BASIC_TEST (./gup_test -b)
> Could leaving these unchanged confuse users looking for the test or
> trying to run the benchmark commands?

Documentation/core-api/pin_user_pages.rst has been updated in the last
patch, after the gup.c selftest is added. mm/Kconfig is to be updated,
and I can send a fixup patch for this unless some review comes up that
requires a respin.

Reply via email to