* [PATCH] selftests/mm: link with thp_settings when necessary
@ 2025-08-01 8:54 Wei Yang
2025-08-01 9:02 ` David Hildenbrand
0 siblings, 1 reply; 5+ messages in thread
From: Wei Yang @ 2025-08-01 8:54 UTC (permalink / raw)
To: akpm, david, lorenzo.stoakes, Liam.Howlett, vbabka, rppt, surenb
Cc: linux-mm, linux-kselftest, Wei Yang, Ryan Roberts
Currently all test cases are linked with thp_settings, while only 6
out of 50+ targets rely on it.
Instead of making thp_settings as a common dependency, link it only
when necessary.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
---
tools/testing/selftests/mm/Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index d4f19f87053b..eea4881c918a 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -158,14 +158,19 @@ TEST_FILES += write_hugetlb_memory.sh
include ../lib.mk
-$(TEST_GEN_PROGS): vm_util.c thp_settings.c
-$(TEST_GEN_FILES): vm_util.c thp_settings.c
+$(TEST_GEN_PROGS): vm_util.c
+$(TEST_GEN_FILES): vm_util.c
$(OUTPUT)/uffd-stress: uffd-common.c
$(OUTPUT)/uffd-unit-tests: uffd-common.c
-$(OUTPUT)/uffd-wp-mremap: uffd-common.c
+$(OUTPUT)/uffd-wp-mremap: uffd-common.c thp_settings.c
$(OUTPUT)/protection_keys: pkey_util.c
$(OUTPUT)/pkey_sighandler_tests: pkey_util.c
+$(OUTPUT)/cow: thp_settings.c
+$(OUTPUT)/migration: thp_settings.c
+$(OUTPUT)/khugepaged: thp_settings.c
+$(OUTPUT)/ksm_tests: thp_settings.c
+$(OUTPUT)/soft-dirty: thp_settings.c
ifeq ($(ARCH),x86_64)
BINARIES_32 := $(patsubst %,$(OUTPUT)/%,$(BINARIES_32))
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests/mm: link with thp_settings when necessary
2025-08-01 8:54 [PATCH] selftests/mm: link with thp_settings when necessary Wei Yang
@ 2025-08-01 9:02 ` David Hildenbrand
2025-08-01 11:14 ` Lorenzo Stoakes
2025-08-02 2:22 ` Wei Yang
0 siblings, 2 replies; 5+ messages in thread
From: David Hildenbrand @ 2025-08-01 9:02 UTC (permalink / raw)
To: Wei Yang, akpm, lorenzo.stoakes, Liam.Howlett, vbabka, rppt,
surenb
Cc: linux-mm, linux-kselftest, Ryan Roberts
On 01.08.25 10:54, Wei Yang wrote:
> Currently all test cases are linked with thp_settings, while only 6
> out of 50+ targets rely on it.
>
> Instead of making thp_settings as a common dependency, link it only
> when necessary.
You don't state why we should care about that? I don't see how binary
size is a problem, why do you think it is?
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests/mm: link with thp_settings when necessary
2025-08-01 9:02 ` David Hildenbrand
@ 2025-08-01 11:14 ` Lorenzo Stoakes
2025-08-02 2:33 ` Wei Yang
2025-08-02 2:22 ` Wei Yang
1 sibling, 1 reply; 5+ messages in thread
From: Lorenzo Stoakes @ 2025-08-01 11:14 UTC (permalink / raw)
To: David Hildenbrand
Cc: Wei Yang, akpm, Liam.Howlett, vbabka, rppt, surenb, linux-mm,
linux-kselftest, Ryan Roberts
On Fri, Aug 01, 2025 at 11:02:35AM +0200, David Hildenbrand wrote:
> On 01.08.25 10:54, Wei Yang wrote:
> > Currently all test cases are linked with thp_settings, while only 6
> > out of 50+ targets rely on it.
> >
> > Instead of making thp_settings as a common dependency, link it only
> > when necessary.
>
>
> You don't state why we should care about that? I don't see how binary size
> is a problem, why do you think it is?
Yeah overall I'm with David on this, I'd rather we keep things simple (so
you don't need to remember to link against this file) and just plonk all
the stuff you need to link to together in the Makefile.
It's not really a big deal when it comes to test stuff I don't think.
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests/mm: link with thp_settings when necessary
2025-08-01 9:02 ` David Hildenbrand
2025-08-01 11:14 ` Lorenzo Stoakes
@ 2025-08-02 2:22 ` Wei Yang
1 sibling, 0 replies; 5+ messages in thread
From: Wei Yang @ 2025-08-02 2:22 UTC (permalink / raw)
To: David Hildenbrand
Cc: Wei Yang, akpm, lorenzo.stoakes, Liam.Howlett, vbabka, rppt,
surenb, linux-mm, linux-kselftest, Ryan Roberts
On Fri, Aug 01, 2025 at 11:02:35AM +0200, David Hildenbrand wrote:
>On 01.08.25 10:54, Wei Yang wrote:
>> Currently all test cases are linked with thp_settings, while only 6
>> out of 50+ targets rely on it.
>>
>> Instead of making thp_settings as a common dependency, link it only
>> when necessary.
>
>
>You don't state why we should care about that? I don't see how binary size is
>a problem, why do you think it is?
>
Yes, it doesn't help on the binary size perspective.
I come up with this when doing some test. Each time a change in thp_settings
would rebuild all the tests. My intent is to speed up the build during coding.
Not sure it worth a change.
>Cheers,
>
>David / dhildenb
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] selftests/mm: link with thp_settings when necessary
2025-08-01 11:14 ` Lorenzo Stoakes
@ 2025-08-02 2:33 ` Wei Yang
0 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2025-08-02 2:33 UTC (permalink / raw)
To: Lorenzo Stoakes
Cc: David Hildenbrand, Wei Yang, akpm, Liam.Howlett, vbabka, rppt,
surenb, linux-mm, linux-kselftest, Ryan Roberts
On Fri, Aug 01, 2025 at 12:14:34PM +0100, Lorenzo Stoakes wrote:
>On Fri, Aug 01, 2025 at 11:02:35AM +0200, David Hildenbrand wrote:
>> On 01.08.25 10:54, Wei Yang wrote:
>> > Currently all test cases are linked with thp_settings, while only 6
>> > out of 50+ targets rely on it.
>> >
>> > Instead of making thp_settings as a common dependency, link it only
>> > when necessary.
>>
>>
>> You don't state why we should care about that? I don't see how binary size
>> is a problem, why do you think it is?
>
>Yeah overall I'm with David on this, I'd rather we keep things simple (so
>you don't need to remember to link against this file) and just plonk all
>the stuff you need to link to together in the Makefile.
I have thought about this, while current implementation do specify its
necessary dependency for some target like uffd-common.c/pkey_util.c.
So I thought we may keep the same style.
>
>It's not really a big deal when it comes to test stuff I don't think.
>
Yes, this is not a big deal in general. I come up with this idea because my test
machine is too old. This change could same me some time during
coding/debugging.
>Cheers, Lorenzo
--
Wei Yang
Help you, Help me
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-02 2:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-01 8:54 [PATCH] selftests/mm: link with thp_settings when necessary Wei Yang
2025-08-01 9:02 ` David Hildenbrand
2025-08-01 11:14 ` Lorenzo Stoakes
2025-08-02 2:33 ` Wei Yang
2025-08-02 2:22 ` Wei Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).