Re: [PATCH v3 1/4] mm/page_isolation: make page isolation a standalone bit.
From: Zi Yan
Date: Fri May 09 2025 - 10:03:25 EST
On 8 May 2025, at 16:22, Zi Yan wrote:
> On 7 May 2025, at 17:10, Zi Yan wrote:
>
>> During page isolation, the original migratetype is overwritten, since
>> MIGRATE_* are enums and stored in pageblock bitmaps. Change
>> MIGRATE_ISOLATE to be stored a standalone bit, PB_migrate_isolate, like
>> PB_migrate_skip, so that migratetype is not lost during pageblock
>> isolation. pageblock bits needs to be word aligned, so expand
>> the number of pageblock bits from 4 to 8 and make PB_migrate_isolate bit 7.
>>
>> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
>> ---
>> include/linux/mmzone.h | 17 ++++++++++----
>> include/linux/page-isolation.h | 2 +-
>> include/linux/pageblock-flags.h | 33 +++++++++++++++++++++++++-
>> mm/page_alloc.c | 41 ++++++++++++++++++++++++++++++++-
>> 4 files changed, 86 insertions(+), 7 deletions(-)
>>
>
> Here is the fixup 1/3 to address Johannes’ comments.
>
> From 7eb1d9fa58fdab216862436181e5d2baf2958c54 Mon Sep 17 00:00:00 2001
> From: Zi Yan <ziy@xxxxxxxxxx>
> Date: Thu, 8 May 2025 12:05:59 -0400
> Subject: [PATCH] fixup for mm/page_isolation: make page isolation a standalone
> bit
>
> 1. keep the original is_migrate_isolate_page()
> 2. move {get,set,clear}_pageblock_isolate() to mm/page_isolation.c
> 3. use a single version for get_pageblock_migratetype() and
> get_pfnblock_migratetype().
>
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
> ---
> include/linux/mmzone.h | 6 ------
> include/linux/page-isolation.h | 2 +-
> include/linux/pageblock-flags.h | 24 ------------------------
> mm/page_alloc.c | 25 ++++++++++---------------
> mm/page_isolation.c | 17 +++++++++++++++++
> 5 files changed, 28 insertions(+), 46 deletions(-)
>
Hi Andrew,
This fixup gets rid of the unused function warning[1].
BTW, this series gets several fixups. Let me know if you think a V4
is necessary. Thanks.
[1] https://lore.kernel.org/linux-mm/202505092126.yRGhLhg1-lkp@xxxxxxxxx/