diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-01-06 16:46:43 -0500 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-03-21 12:56:35 -0400 |
commit | 5232c63f46fdd779303527ec36c518cc1e9c6b4e (patch) | |
tree | 86a2005fadd461b81c8f9db76ea33e5bcf634ff6 /mm/page_alloc.c | |
parent | 6315d8a23ce308433cf615e435ca2ee2aee7d11c (diff) | |
download | linux-5232c63f46fdd779303527ec36c518cc1e9c6b4e.tar.gz linux-5232c63f46fdd779303527ec36c518cc1e9c6b4e.tar.bz2 linux-5232c63f46fdd779303527ec36c518cc1e9c6b4e.zip |
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>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3589febc6d31..02283598fd14 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -734,8 +734,7 @@ static void prep_compound_head(struct page *page, unsigned int order) set_compound_page_dtor(page, COMPOUND_PAGE_DTOR); set_compound_order(page, order); atomic_set(compound_mapcount_ptr(page), -1); - if (hpage_pincount_available(page)) - atomic_set(compound_pincount_ptr(page), 0); + atomic_set(compound_pincount_ptr(page), 0); } static void prep_compound_tail(struct page *head, int tail_idx) |