Re: [PATCH v6 0/6] selftests/mm: separate GUP microbenchmarking from functional testing

Sarthak Sharma <[email protected]>
Newsgroups gmane.linux.documentation,gmane.linux.kernel.mm,gmane.linux.kernel
Message-ID <[email protected]>
Hi Mike!

On 8/3/26 2:30 PM, Mike Rapoport 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.
> 
> This sets seems to regress hugetlb tests: 
> 
> https://github.com/linux-mm/linux-mm/actions/runs/30553882784/job/90909219578
> 

Oh, thanks for pointing this out. I found out that the issue is in
thuge-gen.c, where we call test_shmget(getpagesize(), 0), which
internally calls hugetlb_free_pages(size). This attempts to read
/sys/kernel/mm/hugepages/hugepages-4kB, which does not exist.

Earlier, read_file() returned 0 for this case, so there was no issue.
Now that it returns an error for this, the test failed.

Will fix this.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.