Re: [PATCH 1/3] sparc64: remove hugetlb_free_pgd_range()
From: David Hildenbrand
Date: Wed Jul 16 2025 - 04:21:32 EST
On 16.07.25 03:26, Anthony Yznaga wrote:
The sparc implementation of hugetlb_free_pgd_range() is identical
to free_pgd_range() with the exception of checking for and skipping
possible leaf entries at the PUD and PMD levels.
And the pgd loop was optimized out, because probably not applicable.
These checks are
unnecessary because any huge pages have been freed and their PTEs
cleared by the time page tables needed to map them are freed.
Do we know why that handling was added in the first place, and why it no
longer applies?
These is_hugetlb_pmd/is_hugetlb_pud are rather weird on the code path.
Looks like a very nice cleanup.
--
Cheers,
David / dhildenb