Thread (11 messages) 11 messages, 5 authors, 2026-05-20

Re: [PATCH v2 1/2] tools/mm: add a standalone GUP microbenchmark

From: Mark Brown <broonie@kernel.org>
Date: 2026-05-20 11:58:38
Also in: linux-kselftest, linux-mm, lkml

On Wed, May 20, 2026 at 03:45:53PM +0530, Sarthak Sharma wrote:
On 5/20/26 2:25 PM, Mike Rapoport wrote:
quoted
It seems that we need to better share the common code in
tools/testing/selftest.
quoted
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
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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help