Re: [PATCH v2 12/22] mm: add definitions for allocating unmapped pages

From: Vlastimil Babka (SUSE)

Date: Mon May 11 2026 - 14:02:04 EST


On 3/20/26 19:23, Brendan Jackman wrote:
> Create __GFP_UNMAPPED, which requests pages that are not present in the
> direct map. Since this feature has a cost (e.g. more freelists), it's
> behind a kconfig. Unlike other conditionally-defined GFP flags, it
> doesn't fall back to being 0. This prevents building code that uses
> __GFP_UNMAPPED but doesn't depend on the necessary kconfig, since that
> would lead to invisible security issues.
>
> Create a freetype flag to record that pages on the freelists with this
> flag are unmapped. This is currently only needed for MIGRATE_UNMOVABLE
> pages, so the freetype encoding remains trivial.
>
> Also create the corresponding pageblock flag to record the same thing.
>
> To keep patches from being too overwhelming, the actual implementation
> is added separately, this is just types, Kconfig boilerplate, etc.
>
> Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>

Aside from the gfp vs internal flag decision, seems fine.

Acked-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>