Re: [PATCH 3/7] mm/migrate: skip data copy for already-copied folios

From: David Hildenbrand (Arm)

Date: Mon Jun 08 2026 - 11:48:19 EST



>
> Yes,
> In current code, migrate_info only carry FOLIO_ALREADY_COPIED.
> So, =0 and &=~ are equivalent and similar for |= case. I mirrored the
> how anon_vma/old_folio_state get handled __migrate_folio_extract().
>
> But with your other suggestion of marking already_copied immediately
> after folio_mc_copy(), then bitwise clear and set will be required.
> I'll do this.
>
>
>
>> But I wonder if this really belongs exactly here.
>>
>
> I did not understand this.

I was wondering whether this was really the right place to reset/clear it.
Your comment above addresses this.
--
Cheers,

David