Re: [PATCH v4 13/20] mm/migrate: calculate large folio page index using PFN
"David Hildenbrand (Arm)" <[email protected]>
| Newsgroups | gmane.comp.freedesktop.amd-gfx,gmane.linux.kernel.mm,gmane.linux.kernel,gmane.linux.file-systems,gmane.comp.emulators.kvm.devel,gmane.comp.video.dri.devel,gmane.linux.kernel.perf.user |
|---|---|
| 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