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>
Mon, 21 Mar 2022 16:56:35 +0000 (12:56 -0400)
commit5232c63f46fdd779303527ec36c518cc1e9c6b4e
tree86a2005fadd461b81c8f9db76ea33e5bcf634ff6
parent6315d8a23ce308433cf615e435ca2ee2aee7d11c
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