summaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2020-12-08 07:25:39 +0100
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-09-27 15:27:30 +0200
commit575ced1c8b0d3b578b933a68ce67ddaff3df9506 (patch)
tree5d41ccd45954c69f7584e9bffda3472b613f075c /mm/filemap.c
parentmm/filemap: Add __folio_lock_or_retry() (diff)
downloadlinux-575ced1c8b0d3b578b933a68ce67ddaff3df9506.tar.xz
linux-575ced1c8b0d3b578b933a68ce67ddaff3df9506.zip
mm/swap: Add folio_rotate_reclaimable()
Convert rotate_reclaimable_page() to folio_rotate_reclaimable(). This eliminates all five of the calls to compound_head() in this function, saving 75 bytes at the cost of adding 15 bytes to its one caller, end_page_writeback(). We also save 36 bytes from pagevec_move_tail_fn() due to using folios there. Net 96 bytes savings. Also move its declaration to mm/internal.h as it's only used by filemap.c. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: William Kucharski <william.kucharski@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Reviewed-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 706d121ca9cc..6a5bdb4f7c73 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1584,8 +1584,9 @@ void end_page_writeback(struct page *page)
* ever page writeback.
*/
if (PageReclaim(page)) {
+ struct folio *folio = page_folio(page);
ClearPageReclaim(page);
- rotate_reclaimable_page(page);
+ folio_rotate_reclaimable(folio);
}
/*