Re: [PATCH v2 03/15] mm/hugetlb: preserve reservations when shrinking on HIGHMEM
From: Oscar Salvador (SUSE)
Date: Tue Nov 17 2026 - 05:13:35 EST
On Mon, Nov 16, 2026 at 07:29:24PM +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>
Acked-by: Oscar Salvador (SUSE) <osalvador@xxxxxxxxxx>
--
Oscar Salvador
SUSE Labs