Re: [PATCH 1/7] mm/migrate: rename PAGE_ migration flags to FOLIO_
From: Zi Yan
Date: Mon May 18 2026 - 19:56:33 EST
On 19 May 2026, at 0:54, Jonathan Cameron wrote:
> On Tue, 28 Apr 2026 15:50:39 +0000
> Shivank Garg <shivankg@xxxxxxx> wrote:
>
>> These flags only track folio-specific state during migration and are
>> not used for movable_ops pages. Rename the enum values and the
>> old_page_state variable to match.
>>
>> No functional change.
>>
>> Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
>> Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
>> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
>> Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
>> Signed-off-by: Shivank Garg <shivankg@xxxxxxx>
> Hi.
>
> A few trivial things inline.
>
> Thanks,
>> ---
>> mm/migrate.c | 48 +++++++++++++++++++++++-------------------------
>> 1 file changed, 23 insertions(+), 25 deletions(-)
>>
>> diff --git a/mm/migrate.c b/mm/migrate.c
>
>> static void __migrate_folio_record(struct folio *dst,
>> - int old_page_state,
>> - struct anon_vma *anon_vma)
>> + int old_folio_state, struct anon_vma *anon_vma)
>
> Trivial but why the formatting change?
> This is all well under 80 chars and it makes the diff
> a tiny bit worse than it would otherwise be.
>
>> {
>> - dst->private = (void *)anon_vma + old_page_state;
>> + dst->private = (void *)anon_vma + old_folio_state;
>> }
>>
>> static void __migrate_folio_extract(struct folio *dst,
>> - int *old_page_state,
>> - struct anon_vma **anon_vmap)
>> + int *old_folio_state, struct anon_vma **anon_vmap)
>
> Same as above - avoid the reformat.
This format is preferred by mm and it is different from
kernel’s clang-format.
>
>> {
>> unsigned long private = (unsigned long)dst->private;
>>
Best Regards,
Yan, Zi