From: Mike Rapoport <rppt@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Sarthak Sharma <sarthak.sharma@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Jason Gunthorpe <jgg@ziepe.ca>,
John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>, Shuah Khan <shuah@kernel.org>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 1/2] tools/mm: add a standalone GUP microbenchmark
Date: Wed, 20 May 2026 15:58:16 +0300 [thread overview]
Message-ID: <ag2v6KW8E94kl4M_@kernel.org> (raw)
In-Reply-To: <67e9ecff-e532-4659-b4de-7019474af608@sirena.org.uk>
On Wed, May 20, 2026 at 12:58:32PM +0100, Mark Brown wrote:
> On Wed, May 20, 2026 at 03:45:53PM +0530, Sarthak Sharma wrote:
> > On 5/20/26 2:25 PM, Mike Rapoport wrote:
>
> > > It seems that we need to better share the common code in
> > > tools/testing/selftest.
>
> > > And adding another copy of the hugetlb detection and setup code does not
> > > seem like a great idea.
>
> > Agreed, but that was the least disruptive approach I could think of.
>
> > I am thinking of doing this now: should I move the
> > hugepage_settings.[ch] to tools/lib/ and move the read_num(),
> > write_num(), read_file() and write_file() helpers to a separate file in
these might need some adjustments because they use ksft_(), but in general
it makes sense to me.
> > tools/lib/ itself without any ksft dependency? Then both
> > tools/testing/selftests/* and tools/mm/ could share the same code.
>
> Using tools/lib sounds sensible to me - as well as the sharing it makes
> it clear that it's a library used by multiple things so avoids the
> issues we sometimes have with selftest directories referencing each
> other.
I'd make it tools/lib/mm as most of the files tools/lib/*.c are stubs for
the kernel functions.
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-05-20 12:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 12:05 [PATCH v2 0/2] selftests/mm: separate GUP microbenchmarking from functional testing Sarthak Sharma
2026-05-19 12:05 ` [PATCH v2 1/2] tools/mm: add a standalone GUP microbenchmark Sarthak Sharma
2026-05-20 8:55 ` Mike Rapoport
2026-05-20 9:02 ` Dev Jain
2026-05-20 10:15 ` Sarthak Sharma
2026-05-20 11:58 ` Mark Brown
2026-05-20 12:58 ` Mike Rapoport [this message]
2026-05-20 13:06 ` Sarthak Sharma
2026-05-19 12:05 ` [PATCH v2 2/2] selftests/mm: rewrite gup_test as a standalone harness-based selftest Sarthak Sharma
2026-05-19 18:20 ` [PATCH v2 0/2] selftests/mm: separate GUP microbenchmarking from functional testing Andrew Morton
2026-05-20 6:53 ` Sarthak Sharma
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=ag2v6KW8E94kl4M_@kernel.org \
--to=rppt@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=peterx@redhat.com \
--cc=sarthak.sharma@arm.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--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