aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-04-29 10:27:16 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-10-18 07:49:40 -0400
commit0995d7e568141226f10f8216aa4965e06ab5db8a (patch)
treecc377f799c48bc95a3a097cb3825bf28c76a13a0 /mm/swap.c
parentmm/filemap: Add readahead_folio() (diff)
downloadlinux-dev-0995d7e568141226f10f8216aa4965e06ab5db8a.tar.xz
linux-dev-0995d7e568141226f10f8216aa4965e06ab5db8a.zip
mm/workingset: Convert workingset_refault() to take a folio
This nets us 178 bytes of savings from removing calls to compound_head. The three callers all grow a little, but each of them will be converted to use folios soon, so that's fine. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Howells <dhowells@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/swap.c')
-rw-r--r--mm/swap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/swap.c b/mm/swap.c
index b95fd6d05768..5c1674c98f82 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -293,11 +293,10 @@ void lru_note_cost(struct lruvec *lruvec, bool file, unsigned int nr_pages)
} while ((lruvec = parent_lruvec(lruvec)));
}
-void lru_note_cost_page(struct page *page)
+void lru_note_cost_folio(struct folio *folio)
{
- struct folio *folio = page_folio(page);
- lru_note_cost(folio_lruvec(folio),
- page_is_file_lru(page), thp_nr_pages(page));
+ lru_note_cost(folio_lruvec(folio), folio_is_file_lru(folio),
+ folio_nr_pages(folio));
}
static void __folio_activate(struct folio *folio, struct lruvec *lruvec)