Re: [PATCH v3 15/26] mm/page_alloc: add support for freetypes with no freelist

From: Vlastimil Babka (SUSE)

Date: Fri Jul 31 2026 - 10:20:23 EST


On 7/27/26 00:22, Brendan Jackman wrote:
> Freetypes are currently just a wrapper for migratetypes, but in a later
> patch they will gain flags. The theoretically possible space of
> freetypes will thus grow, but many freetypes will not actually be used
> in practice.
>
> To avoid bloating structures that contain arrays of freelists, mark
> freetype_idx() as possibly returning -1, and add handling of this case
> to code paths that will look up freelists by freetype (unless those
> paths "know" that they're operating on a freetype that has a
> valid freetype_idx).
>
> It never actually returns -1 yet, this is just introduced as a separate
> patch to make review easier.
>
> Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>

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