linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failures after merge of the mm tree
@ 2022-06-20  6:42 Stephen Rothwell
  2022-06-20  7:11 ` Muchun Song
  2022-06-21  7:18 ` Stephen Rothwell
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2022-06-20  6:42 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List, Muchun Song,
	Oscar Salvador

[-- Attachment #1: Type: text/plain, Size: 5680 bytes --]

Hi all,

After merging the mm tree, today's linux-next build (x86_64 allnoconfig)
failed like this:

In file included from arch/x86/include/asm/page.h:86,
                 from arch/x86/include/asm/thread_info.h:12,
                 from include/linux/thread_info.h:60,
                 from arch/x86/include/asm/preempt.h:7,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:55,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:6,
                 from include/linux/slab.h:15,
                 from include/linux/crypto.h:20,
                 from arch/x86/kernel/asm-offsets.c:9:
include/linux/mm.h: In function 'destroy_large_folio':
include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
   35 |         int __sec = page_to_section(__pg);                      \
      |                     ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
   40 | ({      unsigned long __pfn = (pfn);                    \
      |                                ^~~
include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
   52 | #define page_to_pfn __page_to_pfn
      |                     ^~~~~~~~~~~~~
include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
  214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
      |                                      ^~~~~~~~~~~
include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
  312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
      |                                 ^~~~~~~~
include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
  928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
      |                                      ^~~~~~~~~~
In file included from include/linux/memcontrol.h:20,
                 from include/linux/swap.h:9,
                 from include/linux/suspend.h:5,
                 from arch/x86/kernel/asm-offsets.c:13:
include/linux/mm.h: At top level:
include/linux/mm.h:1556:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
 1556 | static inline unsigned long page_to_section(const struct page *page)
      |                             ^~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/page.h:86,
                 from arch/x86/include/asm/thread_info.h:12,
                 from include/linux/thread_info.h:60,
                 from arch/x86/include/asm/preempt.h:7,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:55,
                 from include/linux/mmzone.h:8,
                 from include/linux/gfp.h:6,
                 from include/linux/slab.h:15,
                 from include/linux/crypto.h:20,
                 from arch/x86/kernel/asm-offsets.c:9:
include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
   35 |         int __sec = page_to_section(__pg);                      \
      |                     ^~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
   40 | ({      unsigned long __pfn = (pfn);                    \
      |                                ^~~
include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
   52 | #define page_to_pfn __page_to_pfn
      |                     ^~~~~~~~~~~~~
include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
  214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
      |                                      ^~~~~~~~~~~
include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
  312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
      |                                 ^~~~~~~~
include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
  928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
      |                                      ^~~~~~~~~~
cc1: some warnings being treated as errors

Caused by commit (I think)

  d3b90b76e101 ("mm: convert destroy_compound_page() to destroy_large_folio()")

I have reverted these commits fot today:

56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()

Then I got:

mm/hugetlb_vmemmap.c: In function 'vmemmap_optimizable_pages':
mm/hugetlb_vmemmap.c:110:24: error: implicit declaration of function 'sparse_decode_mem_map' [-Werror=implicit-function-declaration]
  110 |         vmemmap_page = sparse_decode_mem_map(ms->section_mem_map,
      |                        ^~~~~~~~~~~~~~~~~~~~~
mm/hugetlb_vmemmap.c:110:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  110 |         vmemmap_page = _sparsedecode_mem_map(ms->section_mem_map,
      |                      ^
cc1: some warnings being treated as errors

from my arm64 defconfig build.

Caused by commit

  10a768735470 ("mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory")

So I gave up and used the mm tree from next-20220617 for today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failures after merge of the mm tree
  2022-06-20  6:42 linux-next: build failures after merge of the mm tree Stephen Rothwell
@ 2022-06-20  7:11 ` Muchun Song
  2022-06-20 13:51   ` Matthew Wilcox
  2022-06-21  7:18 ` Stephen Rothwell
  1 sibling, 1 reply; 7+ messages in thread
From: Muchun Song @ 2022-06-20  7:11 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List,
	Oscar Salvador

Thanks for your report. It is fixed in thread [1].

https://lore.kernel.org/all/20220619133851.68184-3-songmuchun@bytedance.com/ [1]

On Mon, Jun 20, 2022 at 2:42 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the mm tree, today's linux-next build (x86_64 allnoconfig)
> failed like this:
>
> In file included from arch/x86/include/asm/page.h:86,
>                  from arch/x86/include/asm/thread_info.h:12,
>                  from include/linux/thread_info.h:60,
>                  from arch/x86/include/asm/preempt.h:7,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:55,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:20,
>                  from arch/x86/kernel/asm-offsets.c:9:
> include/linux/mm.h: In function 'destroy_large_folio':
> include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
>    35 |         int __sec = page_to_section(__pg);                      \
>       |                     ^~~~~~~~~~~~~~~
> include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
>    40 | ({      unsigned long __pfn = (pfn);                    \
>       |                                ^~~
> include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
>    52 | #define page_to_pfn __page_to_pfn
>       |                     ^~~~~~~~~~~~~
> include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
>   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>       |                                      ^~~~~~~~~~~
> include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
>   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
>       |                                 ^~~~~~~~
> include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
>   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
>       |                                      ^~~~~~~~~~
> In file included from include/linux/memcontrol.h:20,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/x86/kernel/asm-offsets.c:13:
> include/linux/mm.h: At top level:
> include/linux/mm.h:1556:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
>  1556 | static inline unsigned long page_to_section(const struct page *page)
>       |                             ^~~~~~~~~~~~~~~
> In file included from arch/x86/include/asm/page.h:86,
>                  from arch/x86/include/asm/thread_info.h:12,
>                  from include/linux/thread_info.h:60,
>                  from arch/x86/include/asm/preempt.h:7,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:55,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:20,
>                  from arch/x86/kernel/asm-offsets.c:9:
> include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
>    35 |         int __sec = page_to_section(__pg);                      \
>       |                     ^~~~~~~~~~~~~~~
> include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
>    40 | ({      unsigned long __pfn = (pfn);                    \
>       |                                ^~~
> include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
>    52 | #define page_to_pfn __page_to_pfn
>       |                     ^~~~~~~~~~~~~
> include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
>   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>       |                                      ^~~~~~~~~~~
> include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
>   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
>       |                                 ^~~~~~~~
> include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
>   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
>       |                                      ^~~~~~~~~~
> cc1: some warnings being treated as errors
>
> Caused by commit (I think)
>
>   d3b90b76e101 ("mm: convert destroy_compound_page() to destroy_large_folio()")
>
> I have reverted these commits fot today:
>
> 56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
> e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
> 169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
> d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
>
> Then I got:
>
> mm/hugetlb_vmemmap.c: In function 'vmemmap_optimizable_pages':
> mm/hugetlb_vmemmap.c:110:24: error: implicit declaration of function 'sparse_decode_mem_map' [-Werror=implicit-function-declaration]
>   110 |         vmemmap_page = sparse_decode_mem_map(ms->section_mem_map,
>       |                        ^~~~~~~~~~~~~~~~~~~~~
> mm/hugetlb_vmemmap.c:110:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>   110 |         vmemmap_page = _sparsedecode_mem_map(ms->section_mem_map,
>       |                      ^
> cc1: some warnings being treated as errors
>
> from my arm64 defconfig build.
>
> Caused by commit
>
>   10a768735470 ("mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory")
>
> So I gave up and used the mm tree from next-20220617 for today.
> --
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failures after merge of the mm tree
  2022-06-20  7:11 ` Muchun Song
@ 2022-06-20 13:51   ` Matthew Wilcox
  2022-06-21 22:28     ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Wilcox @ 2022-06-20 13:51 UTC (permalink / raw)
  To: Muchun Song
  Cc: Stephen Rothwell, Andrew Morton, Linux Kernel Mailing List,
	Linux Next Mailing List, Oscar Salvador

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@bytedance.com/ [1]

No, it's a different problem.  I suggest dropping/reverting

https://lore.kernel.org/linux-mm/20220617175020.717127-20-willy@infradead.org/

> On Mon, Jun 20, 2022 at 2:42 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the mm tree, today's linux-next build (x86_64 allnoconfig)
> > failed like this:
> >
> > In file included from arch/x86/include/asm/page.h:86,
> >                  from arch/x86/include/asm/thread_info.h:12,
> >                  from include/linux/thread_info.h:60,
> >                  from arch/x86/include/asm/preempt.h:7,
> >                  from include/linux/preempt.h:78,
> >                  from include/linux/spinlock.h:55,
> >                  from include/linux/mmzone.h:8,
> >                  from include/linux/gfp.h:6,
> >                  from include/linux/slab.h:15,
> >                  from include/linux/crypto.h:20,
> >                  from arch/x86/kernel/asm-offsets.c:9:
> > include/linux/mm.h: In function 'destroy_large_folio':
> > include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
> >    35 |         int __sec = page_to_section(__pg);                      \
> >       |                     ^~~~~~~~~~~~~~~
> > include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
> >    40 | ({      unsigned long __pfn = (pfn);                    \
> >       |                                ^~~
> > include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
> >    52 | #define page_to_pfn __page_to_pfn
> >       |                     ^~~~~~~~~~~~~
> > include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
> >   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
> >       |                                      ^~~~~~~~~~~
> > include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
> >   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
> >       |                                 ^~~~~~~~
> > include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
> >   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
> >       |                                      ^~~~~~~~~~
> > In file included from include/linux/memcontrol.h:20,
> >                  from include/linux/swap.h:9,
> >                  from include/linux/suspend.h:5,
> >                  from arch/x86/kernel/asm-offsets.c:13:
> > include/linux/mm.h: At top level:
> > include/linux/mm.h:1556:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
> >  1556 | static inline unsigned long page_to_section(const struct page *page)
> >       |                             ^~~~~~~~~~~~~~~
> > In file included from arch/x86/include/asm/page.h:86,
> >                  from arch/x86/include/asm/thread_info.h:12,
> >                  from include/linux/thread_info.h:60,
> >                  from arch/x86/include/asm/preempt.h:7,
> >                  from include/linux/preempt.h:78,
> >                  from include/linux/spinlock.h:55,
> >                  from include/linux/mmzone.h:8,
> >                  from include/linux/gfp.h:6,
> >                  from include/linux/slab.h:15,
> >                  from include/linux/crypto.h:20,
> >                  from arch/x86/kernel/asm-offsets.c:9:
> > include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
> >    35 |         int __sec = page_to_section(__pg);                      \
> >       |                     ^~~~~~~~~~~~~~~
> > include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
> >    40 | ({      unsigned long __pfn = (pfn);                    \
> >       |                                ^~~
> > include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
> >    52 | #define page_to_pfn __page_to_pfn
> >       |                     ^~~~~~~~~~~~~
> > include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
> >   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
> >       |                                      ^~~~~~~~~~~
> > include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
> >   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
> >       |                                 ^~~~~~~~
> > include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
> >   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
> >       |                                      ^~~~~~~~~~
> > cc1: some warnings being treated as errors
> >
> > Caused by commit (I think)
> >
> >   d3b90b76e101 ("mm: convert destroy_compound_page() to destroy_large_folio()")
> >
> > I have reverted these commits fot today:
> >
> > 56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
> > e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
> > 169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
> > d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
> >
> > Then I got:
> >
> > mm/hugetlb_vmemmap.c: In function 'vmemmap_optimizable_pages':
> > mm/hugetlb_vmemmap.c:110:24: error: implicit declaration of function 'sparse_decode_mem_map' [-Werror=implicit-function-declaration]
> >   110 |         vmemmap_page = sparse_decode_mem_map(ms->section_mem_map,
> >       |                        ^~~~~~~~~~~~~~~~~~~~~
> > mm/hugetlb_vmemmap.c:110:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >   110 |         vmemmap_page = _sparsedecode_mem_map(ms->section_mem_map,
> >       |                      ^
> > cc1: some warnings being treated as errors
> >
> > from my arm64 defconfig build.
> >
> > Caused by commit
> >
> >   10a768735470 ("mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory")
> >
> > So I gave up and used the mm tree from next-20220617 for today.
> > --
> > Cheers,
> > Stephen Rothwell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failures after merge of the mm tree
  2022-06-20  6:42 linux-next: build failures after merge of the mm tree Stephen Rothwell
  2022-06-20  7:11 ` Muchun Song
@ 2022-06-21  7:18 ` Stephen Rothwell
  2022-06-21 11:14   ` [External] " Muchun Song
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2022-06-21  7:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List, Muchun Song,
	Oscar Salvador

[-- Attachment #1: Type: text/plain, Size: 6555 bytes --]

Hi all,

On Mon, 20 Jun 2022 16:42:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> After merging the mm tree, today's linux-next build (x86_64 allnoconfig)
> failed like this:
> 
> In file included from arch/x86/include/asm/page.h:86,
>                  from arch/x86/include/asm/thread_info.h:12,
>                  from include/linux/thread_info.h:60,
>                  from arch/x86/include/asm/preempt.h:7,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:55,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:20,
>                  from arch/x86/kernel/asm-offsets.c:9:
> include/linux/mm.h: In function 'destroy_large_folio':
> include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
>    35 |         int __sec = page_to_section(__pg);                      \
>       |                     ^~~~~~~~~~~~~~~
> include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
>    40 | ({      unsigned long __pfn = (pfn);                    \
>       |                                ^~~
> include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
>    52 | #define page_to_pfn __page_to_pfn
>       |                     ^~~~~~~~~~~~~
> include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
>   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>       |                                      ^~~~~~~~~~~
> include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
>   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
>       |                                 ^~~~~~~~
> include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
>   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
>       |                                      ^~~~~~~~~~
> In file included from include/linux/memcontrol.h:20,
>                  from include/linux/swap.h:9,
>                  from include/linux/suspend.h:5,
>                  from arch/x86/kernel/asm-offsets.c:13:
> include/linux/mm.h: At top level:
> include/linux/mm.h:1556:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
>  1556 | static inline unsigned long page_to_section(const struct page *page)
>       |                             ^~~~~~~~~~~~~~~
> In file included from arch/x86/include/asm/page.h:86,
>                  from arch/x86/include/asm/thread_info.h:12,
>                  from include/linux/thread_info.h:60,
>                  from arch/x86/include/asm/preempt.h:7,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:55,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/slab.h:15,
>                  from include/linux/crypto.h:20,
>                  from arch/x86/kernel/asm-offsets.c:9:
> include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
>    35 |         int __sec = page_to_section(__pg);                      \
>       |                     ^~~~~~~~~~~~~~~
> include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
>    40 | ({      unsigned long __pfn = (pfn);                    \
>       |                                ^~~
> include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
>    52 | #define page_to_pfn __page_to_pfn
>       |                     ^~~~~~~~~~~~~
> include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
>   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
>       |                                      ^~~~~~~~~~~
> include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
>   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
>       |                                 ^~~~~~~~
> include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
>   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
>       |                                      ^~~~~~~~~~
> cc1: some warnings being treated as errors
> 
> Caused by commit (I think)
> 
>   d3b90b76e101 ("mm: convert destroy_compound_page() to destroy_large_folio()")
> 
> I have reverted these commits fot today:
> 
> 56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
> e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
> 169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
> d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
> 
> Then I got:
> 
> mm/hugetlb_vmemmap.c: In function 'vmemmap_optimizable_pages':
> mm/hugetlb_vmemmap.c:110:24: error: implicit declaration of function 'sparse_decode_mem_map' [-Werror=implicit-function-declaration]
>   110 |         vmemmap_page = sparse_decode_mem_map(ms->section_mem_map,
>       |                        ^~~~~~~~~~~~~~~~~~~~~
> mm/hugetlb_vmemmap.c:110:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>   110 |         vmemmap_page = _sparsedecode_mem_map(ms->section_mem_map,
>       |                      ^
> cc1: some warnings being treated as errors
> 
> from my arm64 defconfig build.
> 
> Caused by commit
> 
>   10a768735470 ("mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory")
> 
> So I gave up and used the mm tree from next-20220617 for today.

Today, I reverted the following commits instead:

10a768735470 mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory
cececf2df493 mm: memory_hotplug: enumerate all supported section flags
56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
19211dae45bb mm/swap: convert __page_cache_release() to use a folio

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [External] Re: linux-next: build failures after merge of the mm tree
  2022-06-21  7:18 ` Stephen Rothwell
@ 2022-06-21 11:14   ` Muchun Song
  0 siblings, 0 replies; 7+ messages in thread
From: Muchun Song @ 2022-06-21 11:14 UTC (permalink / raw)
  To: Stephen Rothwell, Andrew Morton
  Cc: Matthew Wilcox (Oracle),
	Linux Kernel Mailing List, Linux Next Mailing List,
	Oscar Salvador

On Tue, Jun 21, 2022 at 3:18 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> On Mon, 20 Jun 2022 16:42:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the mm tree, today's linux-next build (x86_64 allnoconfig)
> > failed like this:
> >
> > In file included from arch/x86/include/asm/page.h:86,
> >                  from arch/x86/include/asm/thread_info.h:12,
> >                  from include/linux/thread_info.h:60,
> >                  from arch/x86/include/asm/preempt.h:7,
> >                  from include/linux/preempt.h:78,
> >                  from include/linux/spinlock.h:55,
> >                  from include/linux/mmzone.h:8,
> >                  from include/linux/gfp.h:6,
> >                  from include/linux/slab.h:15,
> >                  from include/linux/crypto.h:20,
> >                  from arch/x86/kernel/asm-offsets.c:9:
> > include/linux/mm.h: In function 'destroy_large_folio':
> > include/asm-generic/memory_model.h:35:21: error: implicit declaration of function 'page_to_section'; did you mean 'present_section'? [-Werror=implicit-function-declaration]
> >    35 |         int __sec = page_to_section(__pg);                      \
> >       |                     ^~~~~~~~~~~~~~~
> > include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
> >    40 | ({      unsigned long __pfn = (pfn);                    \
> >       |                                ^~~
> > include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
> >    52 | #define page_to_pfn __page_to_pfn
> >       |                     ^~~~~~~~~~~~~
> > include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
> >   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
> >       |                                      ^~~~~~~~~~~
> > include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
> >   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
> >       |                                 ^~~~~~~~
> > include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
> >   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
> >       |                                      ^~~~~~~~~~
> > In file included from include/linux/memcontrol.h:20,
> >                  from include/linux/swap.h:9,
> >                  from include/linux/suspend.h:5,
> >                  from arch/x86/kernel/asm-offsets.c:13:
> > include/linux/mm.h: At top level:
> > include/linux/mm.h:1556:29: error: conflicting types for 'page_to_section'; have 'long unsigned int(const struct page *)'
> >  1556 | static inline unsigned long page_to_section(const struct page *page)
> >       |                             ^~~~~~~~~~~~~~~
> > In file included from arch/x86/include/asm/page.h:86,
> >                  from arch/x86/include/asm/thread_info.h:12,
> >                  from include/linux/thread_info.h:60,
> >                  from arch/x86/include/asm/preempt.h:7,
> >                  from include/linux/preempt.h:78,
> >                  from include/linux/spinlock.h:55,
> >                  from include/linux/mmzone.h:8,
> >                  from include/linux/gfp.h:6,
> >                  from include/linux/slab.h:15,
> >                  from include/linux/crypto.h:20,
> >                  from arch/x86/kernel/asm-offsets.c:9:
> > include/asm-generic/memory_model.h:35:21: note: previous implicit declaration of 'page_to_section' with type 'int()'
> >    35 |         int __sec = page_to_section(__pg);                      \
> >       |                     ^~~~~~~~~~~~~~~
> > include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
> >    40 | ({      unsigned long __pfn = (pfn);                    \
> >       |                                ^~~
> > include/asm-generic/memory_model.h:52:21: note: in expansion of macro '__page_to_pfn'
> >    52 | #define page_to_pfn __page_to_pfn
> >       |                     ^~~~~~~~~~~~~
> > include/linux/mm.h:214:38: note: in expansion of macro 'page_to_pfn'
> >   214 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
> >       |                                      ^~~~~~~~~~~
> > include/linux/page-flags.h:312:33: note: in expansion of macro 'nth_page'
> >   312 | #define folio_page(folio, n)    nth_page(&(folio)->page, n)
> >       |                                 ^~~~~~~~
> > include/linux/mm.h:928:38: note: in expansion of macro 'folio_page'
> >   928 |         enum compound_dtor_id dtor = folio_page(folio, 1)->compound_dtor;
> >       |                                      ^~~~~~~~~~
> > cc1: some warnings being treated as errors
> >
> > Caused by commit (I think)
> >
> >   d3b90b76e101 ("mm: convert destroy_compound_page() to destroy_large_folio()")
> >
> > I have reverted these commits fot today:
> >
> > 56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
> > e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
> > 169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
> > d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
> >
> > Then I got:
> >
> > mm/hugetlb_vmemmap.c: In function 'vmemmap_optimizable_pages':
> > mm/hugetlb_vmemmap.c:110:24: error: implicit declaration of function 'sparse_decode_mem_map' [-Werror=implicit-function-declaration]
> >   110 |         vmemmap_page = sparse_decode_mem_map(ms->section_mem_map,
> >       |                        ^~~~~~~~~~~~~~~~~~~~~
> > mm/hugetlb_vmemmap.c:110:22: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >   110 |         vmemmap_page = _sparsedecode_mem_map(ms->section_mem_map,
> >       |                      ^
> > cc1: some warnings being treated as errors
> >
> > from my arm64 defconfig build.
> >
> > Caused by commit
> >
> >   10a768735470 ("mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory")
> >
> > So I gave up and used the mm tree from next-20220617 for today.
>
> Today, I reverted the following commits instead:
>
> 10a768735470 mm: memory_hotplug: make hugetlb_optimize_vmemmap compatible with memmap_on_memory

For this one, I have fixed it in thread [1]. Hopefully, Andrew can
pick it into "mm" or "next" branch.

[1] https://lore.kernel.org/all/20220620110616.12056-1-songmuchun@bytedance.com/

Thanks.

> cececf2df493 mm: memory_hotplug: enumerate all supported section flags
> 56629699b3dd mm/swap: convert __delete_from_swap_cache() to a folio
> e5085f2cc241 mm/swap: convert delete_from_swap_cache() to take a folio
> 169f02f4efb1 mm: convert page_swap_flags to folio_swap_flags
> d3b90b76e101 mm: convert destroy_compound_page() to destroy_large_folio()
> 19211dae45bb mm/swap: convert __page_cache_release() to use a folio
>
> --
> Cheers,
> Stephen Rothwell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failures after merge of the mm tree
  2022-06-20 13:51   ` Matthew Wilcox
@ 2022-06-21 22:28     ` Andrew Morton
  2022-06-22  2:04       ` Matthew Wilcox
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2022-06-21 22:28 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Muchun Song, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Oscar Salvador

On Mon, 20 Jun 2022 14:51:18 +0100 Matthew Wilcox <willy@infradead.org> 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@bytedance.com/ [1]
> 
> No, it's a different problem.  I suggest dropping/reverting
> 
> https://lore.kernel.org/linux-mm/20220617175020.717127-20-willy@infradead.org/

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;
 
_


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failures after merge of the mm tree
  2022-06-21 22:28     ` Andrew Morton
@ 2022-06-22  2:04       ` Matthew Wilcox
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2022-06-22  2:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Muchun Song, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Oscar Salvador

On Tue, Jun 21, 2022 at 03:28:45PM -0700, Andrew Morton wrote:
> On Mon, 20 Jun 2022 14:51:18 +0100 Matthew Wilcox <willy@infradead.org> 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@bytedance.com/ [1]
> > 
> > No, it's a different problem.  I suggest dropping/reverting
> > 
> > https://lore.kernel.org/linux-mm/20220617175020.717127-20-willy@infradead.org/
> 
> Dropping that creates awkwardness.  How about just uninlining it?

Sure!  We can also make compound_page_dtors static and drop the
declaration in linux/mm.h if we do that.  I think there's a pile of
cleanup to be done around freeing pages/folios, partly from accretions
over the decades, and partly from the existence of folios between order
0 and 9.  Not to mention Mel's recent addition of high-order PCP caching.

But I don't want to do that for this merge window.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-22  2:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20  6:42 linux-next: build failures after merge of the mm tree Stephen Rothwell
2022-06-20  7:11 ` Muchun Song
2022-06-20 13:51   ` Matthew Wilcox
2022-06-21 22:28     ` Andrew Morton
2022-06-22  2:04       ` Matthew Wilcox
2022-06-21  7:18 ` Stephen Rothwell
2022-06-21 11:14   ` [External] " Muchun Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).