Re: [PATCH v4 13/20] mm/migrate: calculate large folio page index using PFN

"David Hildenbrand (Arm)" <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-xe,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-s390,org.kernel.vger.linux-trace-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On 8/6/26 22:21, Lorenzo Stoakes (ARM) wrote:
> Rather than having to figure out the page index to use using
> linear_page_index(), calculate it using PFN.
> 
> This is a more natural fit as the linear page index is immaterial to
> determining the folio page index.
> 
> Derive the page index from the offset between migration entry PFN and folio
> PFN - pvmw.pfn (set via DEFINE_FOLIO_VMA_WALK() which uses folio_pfn() to
> obtain it).
> 
> Additionally remove a not so useful comment and clean the code layout up.
> 
> No functional change intended.
> 
> Suggested-by: David Hildenbrand (Arm) <[email protected]>
> Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
> ---

Acked-by: David Hildenbrand (Arm) <[email protected]>

-- 
Cheers,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.