]> git.proxmox.com Git - mirror_ubuntu-kernels.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>
Mon, 27 Sep 2021 13:27:29 +0000 (09:27 -0400)
commitb620f63358cd35c8e9084ee9fc460153f64714f6
tree7a93abe58da0a53d55ccfbbff573bca10c77cd3a
parentc24016ac3a629655ea164b1129816660187943c0
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