Re: [PATCH v2 02/40] mm/rmap: introduce and use hugetlb_remove_rmap()

From: Muchun Song
Date: Wed Dec 20 2023 - 21:55:52 EST




> On Dec 21, 2023, at 06:44, David Hildenbrand <david@xxxxxxxxxx> wrote:
>
> hugetlb rmap handling differs quite a lot from "ordinary" rmap code.
> For example, hugetlb currently only supports entire mappings, and treats
> any mapping as mapped using a single "logical PTE". Let's move it out
> of the way so we can overhaul our "ordinary" rmap.
> implementation/interface.
>
> Let's introduce and use hugetlb_remove_rmap() and remove the hugetlb
> code from page_remove_rmap(). This effectively removes one check on the
> small-folio path as well.
>
> Add sanity checks that we end up with the right folios in the right
> functions.
>
> Note: all possible candidates that need care are page_remove_rmap() that
> pass compound=true.
>
> Reviewed-by: Yin Fengwei <fengwei.yin@xxxxxxxxx>
> Reviewed-by: Ryan Roberts <ryan.roberts@xxxxxxx>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>

Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>

Thanks.