mm: Make compound_pincount always available
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 6 Jan 2022 21:46:43 +0000 (16:46 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 17 Feb 2022 22:05:52 +0000 (17:05 -0500)
commit1c920ee8aed70c00255c843a676d155b8ebb2780
tree1e97b0f031c2ddb5b33ddc14390d5f976b78061d
parent31b13a2fcd43ed91f8745491349481ca96dc5689
mm: Make compound_pincount always available

Move compound_pincount from the third page to the second page, which
means it's available for all compound pages.  That lets us delete
hpage_pincount_available().

On 32-bit systems, there isn't enough space for both compound_pincount
and compound_nr in the second page (it would collide with page->private,
which is in use for pages in the swap cache), so revert the optimisation
of storing both compound_order and compound_nr on 32-bit systems.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Documentation/core-api/pin_user_pages.rst
include/linux/mm.h
include/linux/mm_types.h
mm/debug.c
mm/gup.c
mm/hugetlb.c
mm/page_alloc.c
mm/rmap.c