selftests/mm: do check_huge_anon() with a number been passed in
Subsystems (4)
PATCH 1/1 selftests/mm: do check_huge_anon() with a number been passed in
Currently it hard coded the number of hugepage to check for check_huge_anon(), but we already have the number passed in.
Do the check based on the number of hugepage passed in is more reasonable.
--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/mm/split_huge_page_test.c +1 -1
@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();
Signature · 1 line
2.34.1
Quoted 8 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>---
Yes. LGTM.
Quoted 16 lines
tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();
Quoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0
tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();
LGTM
Quoted 8 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>---
Signature · 3 lines
Cheers, David / dhildenb
Quoted 8 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>---
Yes. LGTM.
Best regards,
wang lian
Zi Yan
reviewerQuoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0
tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();
Which commit is this patch based on?
In mm-new[1], verify_rss_anon_split_huge_page_all_zeroes() accepts char *one_page and size_t len but no nr_hpages. This breaks split_huge_page_test.c compilation.
Are you forgetting some cleanup patches before this one?
Hi Andrew,
Can you drop this one for now? Thanks.
--
Best Regards,
Yan, Zi
Zi Yan
reviewerQuoted 33 lines · Zi Yan
Quoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();Which commit is this patch based on?
In mm-new[1],
verify_rss_anon_split_huge_page_all_zeroes()accepts char*one_pageandsize_tlen but nonr_hpages. This breakssplit_huge_page_test.ccompilation.
Quoted 8 lines
Are you forgetting some cleanup patches before this one?
Hi Andrew,
Can you drop this one for now? Thanks.
Wait. It seems that mm-new is different from Linus' tree[1]. I wonder what is going on.
--
Best Regards,
Yan, Zi
Zi Yan
reviewerQuoted 40 lines · Zi Yan
Quoted 38 lines · Zi Yan
Quoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();Which commit is this patch based on?
In mm-new[1],
verify_rss_anon_split_huge_page_all_zeroes()accepts char*one_pageandsize_tlen but nonr_hpages. This breakssplit_huge_page_test.ccompilation.Are you forgetting some cleanup patches before this one?
Quoted 8 lines
Quoted 3 lines
Hi Andrew,
Can you drop this one for now? Thanks.
Wait. It seems that mm-new is different from Linus' tree[1]. I wonder what is going on.
Wei, it seems that you lost the race to Muhammad Usama Anjum's cleanup patch[1]. You might need to add nr_hpages back.
[1] https://lore.kernel.org/all/[email protected]/T/#u
--
Best Regards,
Yan, Zi
Andrew Morton
maintainerQuoted 10 lines · On Fri, 08 Aug 2025 12:01:47 -0400 Zi Yan <[email protected]> wrote:
Quoted 4 lines
Wait. It seems that mm-new is different from Linus' tree[1]. I wonder what is going on.
Wei, it seems that you lost the race to Muhammad Usama Anjum's cleanup patch[1]. You might need to add
nr_hpagesback.
Ah, thanks, I'll drop this version of "selftests/mm: do check_huge_anon() with a number been passed in".
Quoted 49 lines · Zi Yan
Quoted 47 lines · Zi Yan
Quoted 33 lines · Zi Yan
Quoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();Which commit is this patch based on?
In mm-new[1],
verify_rss_anon_split_huge_page_all_zeroes()accepts char*one_pageandsize_tlen but nonr_hpages. This breakssplit_huge_page_test.ccompilation.Quoted 8 lines
Are you forgetting some cleanup patches before this one?
Hi Andrew,
Can you drop this one for now? Thanks.
Wait. It seems that mm-new is different from Linus' tree[1]. I wonder what is going on.
Quoted 7 lines
Quoted 1 line
Wei, it seems that you lost the race to Muhammad Usama Anjum's cleanup patch[1]. You might need to add
nr_hpagesback.
Thanks.
My patch is based on mm-unstable. So currently we base commit on mm-new?
Quoted 3 lines
--
Best Regards,
Yan, Zi
Signature · 2 lines
Wei Yang Help you, Help me
Yeah just hit this,
Adnrew - can we please drop this patch from mm-new for now? It's breaking the mm self tests build.
Maybe then Wei you can do a v2 rebased on current state of mm self tests?
Thanks!
Quoted 59 lines · Zi Yan
Quoted 40 lines · Zi Yan
Quoted 38 lines · Zi Yan
Quoted 16 lines · Wei Yang
Currently it hard coded the number of hugepage to check for
check_huge_anon(), but we already have the number passed in.Do the check based on the number of hugepage passed in is more reasonable.
Signed-off-by Wei Yang <[email protected]>--- tools/testing/selftests/mm/split_huge_page_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/split_huge_page_test.c +0
-0tools/testing/selftests/mm/split_huge_page_test.c static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hp · line 117
Quoted 8 lines
tools/testing/selftests/mm/split_huge_page_test.c +1
-1@@ -111,7 +111,7 @@ static void verify_rss_anon_split_huge_page_all_zeroes(char *one_page, int nr_hpunsigned long rss_anon_before, rss_anon_after;size_t i; -if (!check_huge_anon (one_page,4 , pmd_pagesize)) +if (!check_huge_anon (one_page, nr_hpages, pmd_pagesize))ksft_exit_fail_msg ("No THP is allocated\n" ); rss_anon_before =rss_anon ();Which commit is this patch based on?
In mm-new[1],
verify_rss_anon_split_huge_page_all_zeroes()accepts char*one_pageandsize_tlen but nonr_hpages. This breakssplit_huge_page_test.ccompilation.Are you forgetting some cleanup patches before this one?
Quoted 8 lines
Quoted 3 lines
Hi Andrew,
Can you drop this one for now? Thanks.
Wait. It seems that mm-new is different from Linus' tree[1]. I wonder what is going on.
Wei, it seems that you lost the race to Muhammad Usama Anjum's cleanup patch[1]. You might need to add
nr_hpagesback.[1] https://lore.kernel.org/all/[email protected]/T/#u
--
Best Regards,
Yan, Zi
Quoted 7 lines · Lorenzo Stoakes
Yeah just hit this,
Adnrew - can we please drop this patch from mm-new for now? It's breaking the mm self tests build.
Maybe then Wei you can do a v2 rebased on current state of mm self tests?
Yup, v2 is on its way.
Quoted 2 lines
Thanks!
Signature · 2 lines
Wei Yang Help you, Help me