Re: [PATCH v10 2/5] mm: Add helper to convert HMM pfn to migrate pfn
From: David Hildenbrand (Arm)
Date: Tue May 12 2026 - 09:47:01 EST
>>
>>> +
>>> + migrate->src[i] |= (pfn & HMM_PFN_WRITE) ? MIGRATE_PFN_WRITE : 0;
>>> + migrate->src[i] |= (pfn & HMM_PFN_COMPOUND) ? MIGRATE_PFN_COMPOUND : 0;
>>> + migrate->dst[i] = 0;
>>> + }
>>> +
>>> + if (migrate->cpages)
>>> + migrate_vma_unmap(migrate);
>> Can you remind me why we do this here, in the setup() phase? The function doc
>> does not really describe that.
>
> It is to be in par what migrate_vma_setup() does today after the "collect" phase.
>
Ah, okay. How the whole machinery works is still a bit of a mystery for me :)
--
Cheers,
David