Re: [PATCH] mm: migrate: transfer large_rmappable flag in folio_migrate_flags()
From: David Hildenbrand (Arm)
Date: Wed Mar 11 2026 - 10:34:52 EST
On 3/11/26 15:24, Usama Arif wrote:
>
>
> On 11/03/2026 16:38, Zi Yan wrote:
>> On 11 Mar 2026, at 9:33, David Hildenbrand (Arm) wrote:
>>
>>>
>>> compaction_alloc_noprof() does the page_rmappable_folio() at the end.
>>>
>>> I'd assume that all migration allocation functions must take care of that.
>>>
>>> It's a responsibility of the folio allocation code, not folio migration
>>> code.
>>
>> I agree. The migration allocation function needs to give a folio or other
>> types of page matching the original one. Do we want to turn this into
>> a WARN to make sure newfolio matches folio's large_rmappable state?
>>
>
> hmm its done in compaction_alloc() and alloc_migration_target_by_mpol() but I
> dont see this being done in alloc_migration_target() and alloc_misplaced_dst_folio().
__folio_alloc_node() and friends should be calling
page_rmappable_folio(). See __folio_alloc_noprof().
> I think alloc_misplaced_dst_folio() is used by NUMA balancing and alloc_migration_target()
> by hotplug and memory failure?
>
> I am not very familiar with migration code, so maybe I am missing where its being done
> in these paths?
Please double check. If a call is missing, we should fix it there.
--
Cheers,
David