Re: [PATCH v2 09/22] mm/page_alloc: don't overload migratetype in find_suitable_fallback()
From: Vlastimil Babka (SUSE)
Date: Mon May 11 2026 - 09:53:44 EST
On 3/20/26 19:23, Brendan Jackman wrote:
> This function currently returns a signed integer that encodes status
> in-band, as negative numbers, along with a migratetype.
>
> This function is about to be updated to a mode where this in-band
> signaling no longer makes sense. Therefore, switch to a more
> explicit/verbose style that encodes the status and migratetype
> separately.
>
> In the spirit of making things more explicit, also create an enum to
> avoid using magic integer literals with special meanings. This enables
> documenting the values at their definition instead of in one of the
> callers.
>
> Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>