Re: [PATCH v2 10/22] mm: introduce freetype_t
From: Vlastimil Babka (SUSE)
Date: Mon May 11 2026 - 14:28:06 EST
On 3/20/26 19:23, Brendan Jackman wrote:
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -422,6 +422,37 @@ bool get_pfnblock_bit(const struct page *page, unsigned long pfn,
> return test_bit(bitidx + pb_bit, bitmap_word);
> }
>
> +/**
> + * __get_pfnblock_freetype - Return the freetype of a pageblock, optionally
> + * ignoring the fact that it's currently isolated.
> + * @page: The page within the block of interest
> + * @pfn: The target page frame number
> + * @ignore_iso: If isolated, return the migratetype that the block had before
> + * isolation.
> + */
> +__always_inline freetype_t
> +__get_pfnblock_freetype(const struct page *page, unsigned long pfn,
> + bool ignore_iso)
Hm I also noticed ignore_iso is ... ignored until later patch.
> +{
> + int mt = get_pfnblock_migratetype(page, pfn);
> +
> + return migrate_to_freetype(mt, 0);
> +}
> +
> +/**
> + * get_pfnblock_migratetype - Return the freetype of a pageblock
> + * @page: The page within the block of interest
> + * @pfn: The target page frame number
> + *
> + * Return: The freetype of the pageblock
> + */
> +__always_inline freetype_t
> +get_pfnblock_freetype(const struct page *page, unsigned long pfn)
> +{
> + return __get_pfnblock_freetype(page, pfn, 0);
And here it passes 0 to bool.
> +}
> +
> +