mm/swap: Add folio_mark_accessed()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 27 Apr 2021 14:47:39 +0000 (10:47 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 18 Oct 2021 11:49:39 +0000 (07:49 -0400)
commit76580b6529db622964b4ffee59ded25efcb73748
treeccda10588915cc433475b9f6825936a17017367d
parentf2d273927ea49e2f85b660aeca26f58b8a15d385
mm/swap: Add folio_mark_accessed()

Convert mark_page_accessed() to folio_mark_accessed().  It already
operated on the entire compound page, but now we can avoid calling
compound_head quite so many times.  Shrinks the function from 424 bytes
to 295 bytes (shrinking by 129 bytes).  The compatibility wrapper is 30
bytes, plus the 8 bytes for the exported symbol means the kernel shrinks
by 91 bytes.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/swap.h
mm/folio-compat.c
mm/swap.c