Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/mm: do check_huge_anon() with a number been passed in

Currently it hard codes the number of hugepage to check for
check_huge_anon(), but it would be more reasonable to do the check based
on a number passed in.

Pass in the hugepage number and do the check based on it.

Link: https://lkml.kernel.org/r/20250809194209.30484-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed by: Donet Tom <donettom@linux.ibm.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Reviewed-by: wang lian <lianux.mm@gmail.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Wei Yang and committed by
Andrew Morton
4a12633e 10725cd2

+1 -1
+1 -1
tools/testing/selftests/mm/split_huge_page_test.c
··· 111 111 unsigned long rss_anon_before, rss_anon_after; 112 112 size_t i; 113 113 114 - if (!check_huge_anon(one_page, 4, pmd_pagesize)) 114 + if (!check_huge_anon(one_page, nr_hpages, pmd_pagesize)) 115 115 ksft_exit_fail_msg("No THP is allocated\n"); 116 116 117 117 rss_anon_before = rss_anon();