Re: [PATCH rfc 2/9] mm: migrate_device: use more folio in __migrate_device_pages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2024/2/2 3:27, Matthew Wilcox wrote:
On Mon, Jan 29, 2024 at 03:09:27PM +0800, Kefeng Wang wrote:
Use newfolio/folio for migrate_folio_extra()/migrate_folio() to
save three compound_head() calls.

I've looked at this function before and I get stuck on the question of
whether a device page truly is a folio or not.  I think for the moment,
we've decided that it is, so ..

Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

Although ...

@@ -729,13 +730,12 @@ static void __migrate_device_pages(unsigned long *src_pfns,
  		}
mapping = page_mapping(page);
+		folio = page_folio(page);
+		newfolio = page_folio(newpage);

you should save one more call to compound_head() by changing the
page_mapping() to folio_mapping().

Missing this one, will update, thanks.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux