On 1 Oct 2026, at 17:17, Yeoreum Yun wrote: > check_large_folios() only checks for large folios without distinguishing > between anonymous and file-backed huge pages. > > To add huge page type checking, integrate the huge page checks into > __check_huge() and __check_type(): > > 1. If hpage_size == pmd_pagesize, check PAGE_IS_HUGE instead of using > check_large_folios(), since only the mapping type matters. This > identifies PMD-mapped huge pages. > > 2. Otherwise, use check_large_folios() to detect large folios. This > covers mTHP cases. > > 3. Check the folio flags according to the huge page type via > __check_type() > > Suggested-by: David Hildenbrand (Arm) <[email protected]> > Suggested-by: Zi Yan <[email protected]> > Signed-off-by: Yeoreum Yun <[email protected]> > --- > tools/testing/selftests/mm/vm_util.c | 90 > ++++++++++++++++++++++-------------- > 1 file changed, 56 insertions(+), 34 deletions(-) > LGTM.
Acked-by: Zi Yan <[email protected]> Best Regards, Yan, Zi

