]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: Add folio_put()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 7 Dec 2020 04:04:57 +0000 (23:04 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 13 Aug 2021 18:19:12 +0000 (14:19 -0400)
commit5f018b63fb004ea50c4fbdb7a64e362c5b712aa8
tree4a941db60ea63f9c5ab73ec5bf05f4a54282928d
parent032c92517e41ad1047c63bf27e4662bfaad06930
mm: Add folio_put()

If we know we have a folio, we can call folio_put() instead of put_page()
and save the overhead of calling compound_head().  Also skips the
devmap checks.

This commit looks like it should be a no-op, but actually saves 684 bytes
of text with the distro-derived config that I'm testing.  Some functions
grow a little while others shrink.  I presume the compiler is making
different inlining decisions.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jeff Layton <jlayton@kernel.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
include/linux/mm.h