khugepaged: use a folio throughout collapse_file()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 3 Apr 2024 17:18:35 +0000 (18:18 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:34 +0000 (20:56 -0700)
commit8d1e24c0b82d9730d05ee85eb7f4195df8cdf6a6
tree6b45060af15d3b2b3981075e2c7477e41fbcebf9
parent610ff817b981921213ae51e5c5f38c76c6f0405e
khugepaged: use a folio throughout collapse_file()

Pull folios from the page cache instead of pages.  Half of this work had
been done already, but we were still operating on pages for a large chunk
of this function.  There is no attempt in this patch to handle large
folios that are smaller than a THP; that will have to wait for a future
patch.

[willy@infradead.org: the unlikely() is embedded in IS_ERR()]
Link: https://lkml.kernel.org/r/ZhIWX8K0E2tSyMSr@casper.infradead.org
Link: https://lkml.kernel.org/r/20240403171838.1445826-7-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/khugepaged.c