linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
@ 2023-03-20  8:06 kernel test robot
  2023-03-20 15:56 ` Kirill A. Shutemov
  0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2023-03-20  8:06 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: oe-kbuild-all, Linux Memory Management List, Andrew Morton

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/gfp.h:7,
                    from include/linux/mm.h:7,
                    from arch/loongarch/kernel/asm-offsets.c:9:
>> include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
    1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
         |  ^~~~~
   arch/loongarch/kernel/asm-offsets.c:16:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes]
      16 | void output_ptreg_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:63:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes]
      63 | void output_task_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes]
      78 | void output_thread_info_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:94:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes]
      94 | void output_thread_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:137:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes]
     137 | void output_thread_fpu_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:177:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes]
     177 | void output_mm_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:209:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes]
     209 | void output_sc_defines(void)
         |      ^~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:217:6: warning: no previous prototype for 'output_signal_defines' [-Wmissing-prototypes]
     217 | void output_signal_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~
   arch/loongarch/kernel/asm-offsets.c:255:6: warning: no previous prototype for 'output_smpboot_defines' [-Wmissing-prototypes]
     255 | void output_smpboot_defines(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~
   make[2]: *** [scripts/Makefile.build:114: arch/loongarch/kernel/asm-offsets.s] Error 1
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:1287: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:226: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +1749 include/linux/mmzone.h

d41dee369bff3b Andy Whitcroft     2005-06-23  1744  
835c134ec4dd75 Mel Gorman         2007-10-16  1745  #define SECTION_BLOCKFLAGS_BITS \
d9c2340052278d Mel Gorman         2007-10-16  1746  	((1UL << (PFN_SECTION_SHIFT - pageblock_order)) * NR_PAGEBLOCK_BITS)
835c134ec4dd75 Mel Gorman         2007-10-16  1747  
af8daebdbc0833 Kirill A. Shutemov 2023-03-15  1748  #if (MAX_ORDER + PAGE_SHIFT) > SECTION_SIZE_BITS
d41dee369bff3b Andy Whitcroft     2005-06-23 @1749  #error Allocator MAX_ORDER exceeds SECTION_SIZE
d41dee369bff3b Andy Whitcroft     2005-06-23  1750  #endif
d41dee369bff3b Andy Whitcroft     2005-06-23  1751  

:::::: The code at line 1749 was first introduced by commit
:::::: d41dee369bff3b9dcb6328d4d822926c28cc2594 [PATCH] sparsemem memory model

:::::: TO: Andy Whitcroft <apw@shadowen.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-20  8:06 [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE kernel test robot
@ 2023-03-20 15:56 ` Kirill A. Shutemov
  2023-03-21  2:59   ` Huacai Chen
  0 siblings, 1 reply; 8+ messages in thread
From: Kirill A. Shutemov @ 2023-03-20 15:56 UTC (permalink / raw)
  To: kernel test robot, Huacai Chen, WANG Xuerui, loongarch
  Cc: Kirill A. Shutemov, oe-kbuild-all, Linux Memory Management List,
	Andrew Morton

On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> compiler: loongarch64-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/gfp.h:7,
>                     from include/linux/mm.h:7,
>                     from arch/loongarch/kernel/asm-offsets.c:9:
> >> include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
>     1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
>          |  ^~~~~

+Loongarch folks.

The same situation as with mips:

https://lore.kernel.org/all/20230315152636.smn34f3c6a5jzpn3@box

-- 
  Kiryl Shutsemau / Kirill A. Shutemov


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-20 15:56 ` Kirill A. Shutemov
@ 2023-03-21  2:59   ` Huacai Chen
  2023-03-22  7:42     ` Mike Rapoport
  0 siblings, 1 reply; 8+ messages in thread
From: Huacai Chen @ 2023-03-21  2:59 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: kernel test robot, WANG Xuerui, loongarch, Kirill A. Shutemov,
	oe-kbuild-all, Linux Memory Management List, Andrew Morton

Hi, all,

On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
<kirill@shutemov.name> wrote:
>
> On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> > commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> > config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> > compiler: loongarch64-linux-gcc (GCC) 12.1.0
> > reproduce (this is a W=1 build):
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
> >         # save the config file
> >         mkdir build_dir && cp config build_dir/.config
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
> >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> >
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from include/linux/gfp.h:7,
> >                     from include/linux/mm.h:7,
> >                     from arch/loongarch/kernel/asm-offsets.c:9:
> > >> include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
> >     1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
> >          |  ^~~~~
>
> +Loongarch folks.
LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.

Huacai
>
> The same situation as with mips:
>
> https://lore.kernel.org/all/20230315152636.smn34f3c6a5jzpn3@box
>
> --
>   Kiryl Shutsemau / Kirill A. Shutemov


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-21  2:59   ` Huacai Chen
@ 2023-03-22  7:42     ` Mike Rapoport
  2023-03-22  7:54       ` WANG Xuerui
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Rapoport @ 2023-03-22  7:42 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Kirill A. Shutemov, kernel test robot, WANG Xuerui, loongarch,
	Kirill A. Shutemov, oe-kbuild-all, Linux Memory Management List,
	Andrew Morton

On Tue, Mar 21, 2023 at 10:59:36AM +0800, Huacai Chen wrote:
> Hi, all,
> 
> On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
> <kirill@shutemov.name> wrote:
> >
> > On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> > > commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> > > config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> > > compiler: loongarch64-linux-gcc (GCC) 12.1.0
> > > reproduce (this is a W=1 build):
> > >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >         chmod +x ~/bin/make.cross
> > >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > >         git fetch --no-tags linux-next master
> > >         git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > >         # save the config file
> > >         mkdir build_dir && cp config build_dir/.config
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
> > >         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >    In file included from include/linux/gfp.h:7,
> > >                     from include/linux/mm.h:7,
> > >                     from arch/loongarch/kernel/asm-offsets.c:9:
> > > >> include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > >     1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > >          |  ^~~~~
> >
> > +Loongarch folks.
> LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
> of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.
 
The ranges MIPS add LoongArch define for ARCH_FORCE_MAX_ORDER are insane.
I'm going to drop them and leave ARCH_FORCE_MAX_ORDER an int with sane
defaults.

As for this splat, in the .config above ARCH_FORCE_MAX_ORDER=14 and
PAGE_SIZE=64k, so we end up with MAX_ORDER + PAGE_SHIFT being 30, that's
larger than SECTION_SIZE.

AFAIK randconfig does not randomize integers, so it's unclear to me how
ARCH_FORCE_MAX_ORDER got to 14.

> Huacai
> >
> > The same situation as with mips:
> >
> > https://lore.kernel.org/all/20230315152636.smn34f3c6a5jzpn3@box
> >
> > --
> >   Kiryl Shutsemau / Kirill A. Shutemov
> 

-- 
Sincerely yours,
Mike.


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-22  7:42     ` Mike Rapoport
@ 2023-03-22  7:54       ` WANG Xuerui
  2023-03-22  8:11         ` Mike Rapoport
  0 siblings, 1 reply; 8+ messages in thread
From: WANG Xuerui @ 2023-03-22  7:54 UTC (permalink / raw)
  To: Mike Rapoport, Huacai Chen
  Cc: Kirill A. Shutemov, kernel test robot, loongarch,
	Kirill A. Shutemov, oe-kbuild-all, Linux Memory Management List,
	Andrew Morton

On 2023/3/22 15:42, Mike Rapoport wrote:
> On Tue, Mar 21, 2023 at 10:59:36AM +0800, Huacai Chen wrote:
>> Hi, all,
>>
>> On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
>> <kirill@shutemov.name> wrote:
>>>
>>> On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
>>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>>> head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
>>>> commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
>>>> config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
>>>> compiler: loongarch64-linux-gcc (GCC) 12.1.0
>>>> reproduce (this is a W=1 build):
>>>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>>          chmod +x ~/bin/make.cross
>>>>          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
>>>>          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>>>>          git fetch --no-tags linux-next master
>>>>          git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
>>>>          # save the config file
>>>>          mkdir build_dir && cp config build_dir/.config
>>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
>>>>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
>>>>
>>>> If you fix the issue, kindly add following tag where applicable
>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>> | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>     In file included from include/linux/gfp.h:7,
>>>>                      from include/linux/mm.h:7,
>>>>                      from arch/loongarch/kernel/asm-offsets.c:9:
>>>>>> include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
>>>>      1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
>>>>           |  ^~~~~
>>>
>>> +Loongarch folks.
>> LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
>> of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.
>   
> The ranges MIPS add LoongArch define for ARCH_FORCE_MAX_ORDER are insane.
> I'm going to drop them and leave ARCH_FORCE_MAX_ORDER an int with sane
> defaults.
> 
> As for this splat, in the .config above ARCH_FORCE_MAX_ORDER=14 and
> PAGE_SIZE=64k, so we end up with MAX_ORDER + PAGE_SHIFT being 30, that's
> larger than SECTION_SIZE.
> 
> AFAIK randconfig does not randomize integers, so it's unclear to me how
> ARCH_FORCE_MAX_ORDER got to 14.
> 

As far as I can see, arch/loongarch/Kconfig has the following lines:

 > config ARCH_FORCE_MAX_ORDER
 >         int "Maximum zone order"
 >         range 14 64 if PAGE_SIZE_64KB
 >         default "14" if PAGE_SIZE_64KB
 >         range 12 64 if PAGE_SIZE_16KB
 >         default "12" if PAGE_SIZE_16KB
 >         range 11 64
 >         default "11"

So the value 14 is because PAGE_SIZE_64KB is being set, which I 
confirmed to be the case with this particular run. And I believe the 
stanza is inherited from arch/mips.

Looking at other arches it seems a much smaller upper limit would be 
desirable. Even the lower limit of 14 could be lowered, e.g. 
arch/powerpc has "range 8 9 if PPC64 && PPC_64K_PAGES". Is that okay?

-- 
WANG "xen0n" Xuerui

Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/



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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-22  7:54       ` WANG Xuerui
@ 2023-03-22  8:11         ` Mike Rapoport
  2023-03-22 10:01           ` Kirill A. Shutemov
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Rapoport @ 2023-03-22  8:11 UTC (permalink / raw)
  To: WANG Xuerui
  Cc: Huacai Chen, Kirill A. Shutemov, kernel test robot, loongarch,
	Kirill A. Shutemov, oe-kbuild-all, Linux Memory Management List,
	Andrew Morton

On Wed, Mar 22, 2023 at 03:54:09PM +0800, WANG Xuerui wrote:
> On 2023/3/22 15:42, Mike Rapoport wrote:
> > On Tue, Mar 21, 2023 at 10:59:36AM +0800, Huacai Chen wrote:
> > > Hi, all,
> > > 
> > > On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
> > > <kirill@shutemov.name> wrote:
> > > > 
> > > > On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> > > > > commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> > > > > config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> > > > > compiler: loongarch64-linux-gcc (GCC) 12.1.0
> > > > > reproduce (this is a W=1 build):
> > > > >          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > > >          chmod +x ~/bin/make.cross
> > > > >          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > >          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > > >          git fetch --no-tags linux-next master
> > > > >          git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > >          # save the config file
> > > > >          mkdir build_dir && cp config build_dir/.config
> > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
> > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> > > > > 
> > > > > If you fix the issue, kindly add following tag where applicable
> > > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > > | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> > > > > 
> > > > > All errors (new ones prefixed by >>):
> > > > > 
> > > > >     In file included from include/linux/gfp.h:7,
> > > > >                      from include/linux/mm.h:7,
> > > > >                      from arch/loongarch/kernel/asm-offsets.c:9:
> > > > > > > include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > >      1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > >           |  ^~~~~
> > > > 
> > > > +Loongarch folks.
> > > LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
> > > of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.
> > The ranges MIPS add LoongArch define for ARCH_FORCE_MAX_ORDER are insane.
> > I'm going to drop them and leave ARCH_FORCE_MAX_ORDER an int with sane
> > defaults.
> > 
> > As for this splat, in the .config above ARCH_FORCE_MAX_ORDER=14 and
> > PAGE_SIZE=64k, so we end up with MAX_ORDER + PAGE_SHIFT being 30, that's
> > larger than SECTION_SIZE.
> > 
> > AFAIK randconfig does not randomize integers, so it's unclear to me how
> > ARCH_FORCE_MAX_ORDER got to 14.
> > 
> 
> As far as I can see, arch/loongarch/Kconfig has the following lines:
> 
> > config ARCH_FORCE_MAX_ORDER
> >         int "Maximum zone order"
> >         range 14 64 if PAGE_SIZE_64KB
> >         default "14" if PAGE_SIZE_64KB
> >         range 12 64 if PAGE_SIZE_16KB
> >         default "12" if PAGE_SIZE_16KB
> >         range 11 64
> >         default "11"
> 
> So the value 14 is because PAGE_SIZE_64KB is being set, which I confirmed to
> be the case with this particular run. And I believe the stanza is inherited
> from arch/mips.

With Kirill's patch the range became '13 63', so I don't see why randconfig
would set ARCH_FORCE_MAX_ORDER to 14.
 
> Looking at other arches it seems a much smaller upper limit would be
> desirable. Even the lower limit of 14 could be lowered, e.g. arch/powerpc
> has "range 8 9 if PPC64 && PPC_64K_PAGES". Is that okay?

I don't think architectures should mess with MAX_ORDER unless strictly
necessary. Having an integer config symbol with sensible defaults is enough
to ensure that MAX_ORDER can fit a PMD page.

I really doubt anyone should ever override that default in their kernel
builds.
 
> -- 
> WANG "xen0n" Xuerui
> 
> Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
> 

-- 
Sincerely yours,
Mike.


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-22  8:11         ` Mike Rapoport
@ 2023-03-22 10:01           ` Kirill A. Shutemov
  2023-03-23  7:24             ` Liu, Yujie
  0 siblings, 1 reply; 8+ messages in thread
From: Kirill A. Shutemov @ 2023-03-22 10:01 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: WANG Xuerui, Huacai Chen, kernel test robot, loongarch,
	Kirill A. Shutemov, oe-kbuild-all, Linux Memory Management List,
	Andrew Morton

On Wed, Mar 22, 2023 at 10:11:47AM +0200, Mike Rapoport wrote:
> On Wed, Mar 22, 2023 at 03:54:09PM +0800, WANG Xuerui wrote:
> > On 2023/3/22 15:42, Mike Rapoport wrote:
> > > On Tue, Mar 21, 2023 at 10:59:36AM +0800, Huacai Chen wrote:
> > > > Hi, all,
> > > > 
> > > > On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
> > > > <kirill@shutemov.name> wrote:
> > > > > 
> > > > > On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> > > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > > head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> > > > > > commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> > > > > > config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> > > > > > compiler: loongarch64-linux-gcc (GCC) 12.1.0
> > > > > > reproduce (this is a W=1 build):
> > > > > >          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > > > >          chmod +x ~/bin/make.cross
> > > > > >          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > > >          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > > > >          git fetch --no-tags linux-next master
> > > > > >          git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > > >          # save the config file
> > > > > >          mkdir build_dir && cp config build_dir/.config
> > > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
> > > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> > > > > > 
> > > > > > If you fix the issue, kindly add following tag where applicable
> > > > > > | Reported-by: kernel test robot <lkp@intel.com>
> > > > > > | Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> > > > > > 
> > > > > > All errors (new ones prefixed by >>):
> > > > > > 
> > > > > >     In file included from include/linux/gfp.h:7,
> > > > > >                      from include/linux/mm.h:7,
> > > > > >                      from arch/loongarch/kernel/asm-offsets.c:9:
> > > > > > > > include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > > >      1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > > >           |  ^~~~~
> > > > > 
> > > > > +Loongarch folks.
> > > > LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
> > > > of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.
> > > The ranges MIPS add LoongArch define for ARCH_FORCE_MAX_ORDER are insane.
> > > I'm going to drop them and leave ARCH_FORCE_MAX_ORDER an int with sane
> > > defaults.
> > > 
> > > As for this splat, in the .config above ARCH_FORCE_MAX_ORDER=14 and
> > > PAGE_SIZE=64k, so we end up with MAX_ORDER + PAGE_SHIFT being 30, that's
> > > larger than SECTION_SIZE.
> > > 
> > > AFAIK randconfig does not randomize integers, so it's unclear to me how
> > > ARCH_FORCE_MAX_ORDER got to 14.
> > > 
> > 
> > As far as I can see, arch/loongarch/Kconfig has the following lines:
> > 
> > > config ARCH_FORCE_MAX_ORDER
> > >         int "Maximum zone order"
> > >         range 14 64 if PAGE_SIZE_64KB
> > >         default "14" if PAGE_SIZE_64KB
> > >         range 12 64 if PAGE_SIZE_16KB
> > >         default "12" if PAGE_SIZE_16KB
> > >         range 11 64
> > >         default "11"
> > 
> > So the value 14 is because PAGE_SIZE_64KB is being set, which I confirmed to
> > be the case with this particular run. And I believe the stanza is inherited
> > from arch/mips.
> 
> With Kirill's patch the range became '13 63', so I don't see why randconfig
> would set ARCH_FORCE_MAX_ORDER to 14.

I think the failure just due to 0day having old config it tries to re-use.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov


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

* Re: [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
  2023-03-22 10:01           ` Kirill A. Shutemov
@ 2023-03-23  7:24             ` Liu, Yujie
  0 siblings, 0 replies; 8+ messages in thread
From: Liu, Yujie @ 2023-03-23  7:24 UTC (permalink / raw)
  To: kirill, rppt
  Cc: lkp, loongarch, kernel, akpm, linux-mm, chenhuacai,
	oe-kbuild-all, kirill.shutemov

On Wed, 2023-03-22 at 13:01 +0300, Kirill A. Shutemov wrote:
> On Wed, Mar 22, 2023 at 10:11:47AM +0200, Mike Rapoport wrote:
> > On Wed, Mar 22, 2023 at 03:54:09PM +0800, WANG Xuerui wrote:
> > > On 2023/3/22 15:42, Mike Rapoport wrote:
> > > > On Tue, Mar 21, 2023 at 10:59:36AM +0800, Huacai Chen wrote:
> > > > > Hi, all,
> > > > > 
> > > > > On Mon, Mar 20, 2023 at 11:56 PM Kirill A. Shutemov
> > > > > <kirill@shutemov.name> wrote:
> > > > > > 
> > > > > > On Mon, Mar 20, 2023 at 04:06:33PM +0800, kernel test robot wrote:
> > > > > > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > > > > > head:   73f2c2a7e1d2b31fdd5faa6dfa151c437a6c0a5a
> > > > > > > commit: af8daebdbc0833b8095767ccef7ddce55e9fdf32 [3778/4413] mm, treewide: redefine MAX_ORDER sanely
> > > > > > > config: loongarch-buildonly-randconfig-r003-20230320 (https://download.01.org/0day-ci/archive/20230320/202303201615.Qfu18nWV-lkp@intel.com/config)
> > > > > > > compiler: loongarch64-linux-gcc (GCC) 12.1.0
> > > > > > > reproduce (this is a W=1 build):
> > > > > > >          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > > > > > >          chmod +x ~/bin/make.cross
> > > > > > >          # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > > > >          git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > > > > > >          git fetch --no-tags linux-next master
> > > > > > >          git checkout af8daebdbc0833b8095767ccef7ddce55e9fdf32
> > > > > > >          # save the config file
> > > > > > >          mkdir build_dir && cp config build_dir/.config
> > > > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
> > > > > > >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch prepare
> > > > > > > 
> > > > > > > If you fix the issue, kindly add following tag where applicable
> > > > > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > > > > Link: https://lore.kernel.org/oe-kbuild-all/202303201615.Qfu18nWV-lkp@intel.com/
> > > > > > > 
> > > > > > > All errors (new ones prefixed by >>):
> > > > > > > 
> > > > > > >     In file included from include/linux/gfp.h:7,
> > > > > > >                      from include/linux/mm.h:7,
> > > > > > >                      from arch/loongarch/kernel/asm-offsets.c:9:
> > > > > > > > > include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > > > >      1749 | #error Allocator MAX_ORDER exceeds SECTION_SIZE
> > > > > > >           |  ^~~~~
> > > > > > 
> > > > > > +Loongarch folks.
> > > > > LoongArch defines SECTION_SIZE_BITS as 29, so I think the upper limit
> > > > > of ARCH_FORCE_MAX_ORDER should not be 63, MIPS is similar.
> > > > The ranges MIPS add LoongArch define for ARCH_FORCE_MAX_ORDER are insane.
> > > > I'm going to drop them and leave ARCH_FORCE_MAX_ORDER an int with sane
> > > > defaults.
> > > > 
> > > > As for this splat, in the .config above ARCH_FORCE_MAX_ORDER=14 and
> > > > PAGE_SIZE=64k, so we end up with MAX_ORDER + PAGE_SHIFT being 30, that's
> > > > larger than SECTION_SIZE.
> > > > 
> > > > AFAIK randconfig does not randomize integers, so it's unclear to me how
> > > > ARCH_FORCE_MAX_ORDER got to 14.
> > > > 
> > > 
> > > As far as I can see, arch/loongarch/Kconfig has the following lines:
> > > 
> > > > config ARCH_FORCE_MAX_ORDER
> > > >         int "Maximum zone order"
> > > >         range 14 64 if PAGE_SIZE_64KB
> > > >         default "14" if PAGE_SIZE_64KB
> > > >         range 12 64 if PAGE_SIZE_16KB
> > > >         default "12" if PAGE_SIZE_16KB
> > > >         range 11 64
> > > >         default "11"
> > > 
> > > So the value 14 is because PAGE_SIZE_64KB is being set, which I confirmed to
> > > be the case with this particular run. And I believe the stanza is inherited
> > > from arch/mips.
> > 
> > With Kirill's patch the range became '13 63', so I don't see why randconfig
> > would set ARCH_FORCE_MAX_ORDER to 14.
> 
> I think the failure just due to 0day having old config it tries to re-use.

Sorry about this false alarm.

Indeed this failure is due to re-using the old config. This randconfig
was generated when building another tree that still has default value
14 for ARCH_FORCE_MAX_ORDER, and then it was re-used to build this
tree, but the default value was not refreshed to 13 and caused this
error. We will fix this issue in the robot ASAP.

--
Best Regards,
Yujie

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

end of thread, other threads:[~2023-03-23  7:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20  8:06 [linux-next:master 3778/4413] include/linux/mmzone.h:1749:2: error: #error Allocator MAX_ORDER exceeds SECTION_SIZE kernel test robot
2023-03-20 15:56 ` Kirill A. Shutemov
2023-03-21  2:59   ` Huacai Chen
2023-03-22  7:42     ` Mike Rapoport
2023-03-22  7:54       ` WANG Xuerui
2023-03-22  8:11         ` Mike Rapoport
2023-03-22 10:01           ` Kirill A. Shutemov
2023-03-23  7:24             ` Liu, Yujie

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).