Re: [PATCH v2 1/4] mm: hugetlb: Track used_hpages when getting/putting pages from subpool

From: Ackerley Tng

Date: Mon Sep 14 2026 - 12:58:22 EST


Joshua Hahn <joshua.hahnjy@xxxxxxxxx> writes:

> On Wed, 09 Sep 2026 14:49:26 -0700 Ackerley Tng via B4 Relay <devnull+ackerleytng.google.com@xxxxxxxxxx> wrote:
>
>> From: Ackerley Tng <ackerleytng@xxxxxxxxxx>
> Hi Ackerley,
>
> Thank you for working on this fix / simplification!
>
>> HugeTLB subpools currently only track used_hpages when the user
>> configures a size limit.
>>
>> This is buggy since when there are existing allocations from the
>> subpool that would have satisfied the minimum reservations,
>> hugepage_subpool_put_pages() will still restore a reservation to the
>> subpool. See below for an example of a false reservation.
>
> I'm not sure if I see the false reservation example, could I be
> missing something here : -)
>

My bad, I copypasted from the cover letter to this commit message. Will
fix in the next revision.

See more at [1].

[1] https://lore.kernel.org/all/CAEvNRgEwbUXj5cVQq4A-U=AMOzP3S1mjnrOC79Li71wf-E+dDw@xxxxxxxxxxxxxx/

>>
>> [...snip...]
>>