Re: [PATCH v3 0/4] Make MIGRATE_ISOLATE a standalone bit

Johannes Weiner
2025-05-08T04:38:45Z

On Wed, May 07, 2025 at 05:10:55PM -0400, Zi Yan wrote:
>
> Hi Johannes,
>
> I incorporated all your feedback on v2 (see Changelog below), except the
> "decoupling enum migratetype from the pageblock bits" one[1], since all
> 5 migratetypes (not MIGRATE_ISOLATE) are just values and
> "#define PB_migratetype_bits MIGRATE_TYPE_BITS" would take 5 bits
> for migratetypes, which only requires 3 bits. Let me know if I
> misunderstand your suggestion. Thanks.

Right, it's better to stick with enum values. My main worry was that
PB_migratetype_bits *usually* correspond to an enum migratetype, and
MIGRATE_ISOLATE being the precarious exception. But I think it's much
clearer with the special-casing in get/set_pageblock_migratetype()
instead of the lower pfnmask functions. Thanks for moving that!