Re: [PATCH v2 03/15] mm/hugetlb: preserve reservations when shrinking on HIGHMEM

From: Rik van Riel

Date: Mon Nov 16 2026 - 18:03:48 EST


On Mon, 2026-11-16 at 19:29 +0100, David Hildenbrand (Arm) wrote:
> try_to_free_low() drops the hugetlb_lock while freeing lowmem folios.
> set_max_huge_pages() then resumes freeing folios using the
> min_count computed before that unlock. Reservations created in
> between
> can consequently lose their backing.
>
> Collect lowmem folios on the caller's existing page_list instead.
> Keep
> the hugetlb_lock held through both selection passes, and free the
> combined
> list at the caller's existing unlock point.
>
> Likely not stable-worthy.
>
> Fixes: 1121828a0c21 ("hugetlb: call update_and_free_page without
> hugetlb_lock")
> Acked-by: Muchun Song <muchun.song@xxxxxxxxx>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>

--
All Rights Reversed.