Re: [PATCH v3 08/10] mm: replace thp_disabled_by_hw() with pgtable_has_pmd_leaves()

From: Lance Yang

Date: Sun Apr 12 2026 - 10:48:23 EST



On Wed, Apr 08, 2026 at 04:23:03PM -0400, Luiz Capitulino wrote:
>Despite its name, thp_disabled_by_hw() just checks whether the
>architecture supports PMD-sized pages. It returns true when
>TRANSPARENT_HUGEPAGE_UNSUPPORTED is set in transparent_hugepage_flags,
>this only occurs if the architecture implements arch_has_pmd_leaves()
>and that function returns false.
>
>Since pgtable_has_pmd_leaves() provides the same semantics, use it
>instead.
>
>Signed-off-by: Luiz Capitulino <luizcap@xxxxxxxxxx>
>---

Nice cleanup, thanks!
Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>