From: "Mika Penttilä" <mpenttil@redhat.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
Balbir Singh <balbirs@nvidia.com>,
akpm@linux-foundation.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] selftests/mm: move the HMM migration benchmark out of selftests
Date: Thu, 26 Nov 2026 11:53:53 +0200 [thread overview]
Message-ID: <a1ac4efd-7d77-4352-93bc-44c4d2650ab1@redhat.com> (raw)
In-Reply-To: <fba23668-add0-4787-b027-bfba1f66e090@kernel.org>
On 11/26/26 08:41, David Hildenbrand (Arm) wrote:
> On 11/26/26 03:56, Balbir Singh wrote:
>> The HMM selftest runs benchmark_thp_migration on every invocation.
>> The benchmark repeatedly migrates buffers in both directions to measure
>> latency and throughput with and without THP. Run it on demand so the
>> regular suite spends its time checking correctness.
>>
>> Move the benchmark into its own hmm-bench binary and share the device
>> fixture, buffer helpers and migration ioctls with hmm-tests. To run it:
>>
>> make -C tools/testing/performance-tests/mm
>> sudo modprobe test_hmm
>> sudo tools/testing/performance-tests/mm/hmm-bench
>>
>> Drop the 128-PMD buffer to bound the amount of memory migrated in one
>> measurement. With 2 MiB PMDs, the largest buffer falls from 256 MiB to
>> 16 MiB. The remaining sizes still cover buffers smaller than a PMD, a
>> single PMD and multiple PMDs, with and without MADV_HUGEPAGE.
>>
>> Call fflush(stdout) after printing the results for each buffer size.
>> The kselftest harness ends the test child with _exit(0), so timing
>> results still buffered in stdout can be lost when output is redirected
>> to a file or pipe.
> There was recently a discussion on where to put performance tests. Usually it's
> much rather tools to test performance.
>
> So what about tools/mm/ instead, where we also placed gup_bench.c ?
>
The slimmed down test runs very quickly and with less memory pressure already, so maybe not a big issue keeping that in hmm-tests either, i see the value of having all HMM tests in one test.
But tools/mm sounds a logical place if want to separate tests.
--Mika
prev parent reply other threads:[~2026-11-26 9:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 2:56 Balbir Singh
2026-11-26 6:41 ` David Hildenbrand (Arm)
2026-11-26 9:47 ` Balbir Singh
2026-11-26 9:53 ` Mika Penttilä [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1ac4efd-7d77-4352-93bc-44c4d2650ab1@redhat.com \
--to=mpenttil@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=balbirs@nvidia.com \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=vbabka@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®