Re: linux-next: build failures after merge of the mm tree

From: Andrew Morton
Date: Tue Jun 21 2022 - 18:29:10 EST


On Mon, 20 Jun 2022 14:51:18 +0100 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> On Mon, Jun 20, 2022 at 03:11:31PM +0800, Muchun Song wrote:
> > Thanks for your report. It is fixed in thread [1].
> >
> > https://lore.kernel.org/all/20220619133851.68184-3-songmuchun@xxxxxxxxxxxxx/ [1]
>
> No, it's a different problem. I suggest dropping/reverting
>
> https://lore.kernel.org/linux-mm/20220617175020.717127-20-willy@xxxxxxxxxxxxx/

Dropping that creates awkwardness. How about just uninlining it?

--- a/include/linux/mm.h~mm-convert-destroy_compound_page-to-destroy_large_folio-fix
+++ a/include/linux/mm.h
@@ -923,13 +923,7 @@ static inline void set_compound_page_dto
page[1].compound_dtor = compound_dtor;
}

-static inline void destroy_large_folio(struct folio *folio)
-{
- enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
-
- VM_BUG_ON_FOLIO(dtor >= NR_COMPOUND_DTORS, folio);
- compound_page_dtors[dtor](&folio->page);
-}
+void destroy_large_folio(struct folio *folio);

static inline int head_compound_pincount(struct page *head)
{
--- a/mm/page_alloc.c~mm-convert-destroy_compound_page-to-destroy_large_folio-fix
+++ a/mm/page_alloc.c
@@ -822,6 +822,14 @@ void prep_compound_page(struct page *pag
prep_compound_head(page, order);
}

+void destroy_large_folio(struct folio *folio)
+{
+ enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
+
+ VM_BUG_ON_FOLIO(dtor >= NR_COMPOUND_DTORS, folio);
+ compound_page_dtors[dtor](&folio->page);
+}
+
#ifdef CONFIG_DEBUG_PAGEALLOC
unsigned int _debug_guardpage_minorder;

_