Re: [PATCH v2 1/1] mm/huge_memory: simplify pgtable deposit detection
From: Zi Yan
Date: Thu Sep 17 2026 - 13:33:51 EST
On 17 Sep 2026, at 1:40, Lance Yang wrote:
> Whether a PMD has a deposited PTE page table only depends on whether the
> architecture requires deposits or the VMA is anonymous.
>
> Implement this rule directly in vma_has_deposited_pgtable(), avoiding
> mistaking a non-anonymous raw PFN PMD for one with a deposit and attempting
> to withdraw a page table that was never deposited.
>
> Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
> Signed-off-by: Lance Yang <lance.yang@xxxxxxxxx>
> ---
> v1 -> v2:
> - Simplify the pgtable deposit check and rename the helper (per David) - thanks!
> - https://lore.kernel.org/linux-mm/20260913051942.40889-1-lance.yang@xxxxxxxxx
>
> mm/huge_memory.c | 22 +++++-----------------
> 1 file changed, 5 insertions(+), 17 deletions(-)
>
LGTM.
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi