Re: [PATCH] Respect mempolicy when calculating surplus huge pages.

From: Andrew Morton

Date: Fri May 29 2026 - 23:35:29 EST


On Wed, 27 May 2026 16:48:46 -0600 Charles Haithcock <chaithco@xxxxxxxxxx> wrote:

> Presently, when calculating how many huge pages are needed when
> reserving surplus huge pages, the global count of free huge pages
> are used. When reserving with a mempolicy, the global count of free huge
> pages is used even if some/all of those free huge pages are on numa
> nodes outside of the mempolicy. Fix it so free huge pages only on nodes
> within the mempolicy are considered.
>

Thanks. AI review asked a thing:
https://sashiko.dev/#/patchset/20260527224848.1753560-1-chaithco@xxxxxxxxxx