oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
       [not found] <20250510010338.3978696-1-jyescas@google.com>
@ 2025-05-10 17:16 ` kernel test robot
  2025-05-13 15:08   ` Zi Yan
  0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2025-05-10 17:16 UTC (permalink / raw)
  To: Juan Yescas, Andrew Morton, Zi Yan, linux-kernel
  Cc: oe-kbuild-all, Linux Memory Management List, tjmercier,
	isaacmanjarres, surenb, kaleshsingh, Vlastimil Babka,
	Liam R. Howlett, Lorenzo Stoakes, David Hildenbrand,
	Mike Rapoport, Minchan Kim

Hi Juan,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.15-rc5]
[cannot apply to akpm-mm/mm-everything next-20250509]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
base:   linus/master
patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/gfp.h:7,
                    from include/linux/xarray.h:16,
                    from include/linux/list_lru.h:14,
                    from include/linux/fs.h:14,
                    from include/linux/compat.h:17,
                    from arch/powerpc/kernel/asm-offsets.c:12:
>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
      53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
         |  ^~~~~
   make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1275: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +53 include/linux/mmzone.h

    46	
    47	/*
    48	 * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
    49	 * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
    50	 * which defines the order for the number of pages that can have a migrate type
    51	 */
    52	#if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
  > 53	#error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
    54	#endif
    55	

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

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-10 17:16 ` [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order kernel test robot
@ 2025-05-13 15:08   ` Zi Yan
  2025-05-13 16:41     ` Juan Yescas
  0 siblings, 1 reply; 7+ messages in thread
From: Zi Yan @ 2025-05-13 15:08 UTC (permalink / raw)
  To: Juan Yescas, Andrew Morton
  Cc: kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On 10 May 2025, at 13:16, kernel test robot wrote:

> Hi Juan,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on linus/master]
> [also build test ERROR on v6.15-rc5]
> [cannot apply to akpm-mm/mm-everything next-20250509]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
> base:   linus/master
> patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
> patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
> compiler: powerpc64-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>    In file included from include/linux/gfp.h:7,
>                     from include/linux/xarray.h:16,
>                     from include/linux/list_lru.h:14,
>                     from include/linux/fs.h:14,
>                     from include/linux/compat.h:17,
>                     from arch/powerpc/kernel/asm-offsets.c:12:
>>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>          |  ^~~~~
>    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1

In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.

>    make[3]: Target 'prepare' not remade because of errors.
>    make[2]: *** [Makefile:1275: prepare0] Error 2
>    make[2]: Target 'prepare' not remade because of errors.
>    make[1]: *** [Makefile:248: __sub-make] Error 2
>    make[1]: Target 'prepare' not remade because of errors.
>    make: *** [Makefile:248: __sub-make] Error 2
>    make: Target 'prepare' not remade because of errors.
>
>
> vim +53 include/linux/mmzone.h
>
>     46	
>     47	/*
>     48	 * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
>     49	 * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
>     50	 * which defines the order for the number of pages that can have a migrate type
>     51	 */
>     52	#if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
>   > 53	#error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>     54	#endif
>     55	
>
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


Best Regards,
Yan, Zi

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-13 15:08   ` Zi Yan
@ 2025-05-13 16:41     ` Juan Yescas
  2025-05-13 16:47       ` Zi Yan
  0 siblings, 1 reply; 7+ messages in thread
From: Juan Yescas @ 2025-05-13 16:41 UTC (permalink / raw)
  To: Zi Yan
  Cc: Andrew Morton, kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On Tue, May 13, 2025 at 8:08 AM Zi Yan <ziy@nvidia.com> wrote:
>
> On 10 May 2025, at 13:16, kernel test robot wrote:
>
> > Hi Juan,
> >
> > kernel test robot noticed the following build errors:
> >
> > [auto build test ERROR on linus/master]
> > [also build test ERROR on v6.15-rc5]
> > [cannot apply to akpm-mm/mm-everything next-20250509]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >
> > url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
> > base:   linus/master
> > patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
> > patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
> > config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
> > compiler: powerpc64-linux-gcc (GCC) 14.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from include/linux/gfp.h:7,
> >                     from include/linux/xarray.h:16,
> >                     from include/linux/list_lru.h:14,
> >                     from include/linux/fs.h:14,
> >                     from include/linux/compat.h:17,
> >                     from arch/powerpc/kernel/asm-offsets.c:12:
> >>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >          |  ^~~~~
> >    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
>
> In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
> the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
> be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
> set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.

In ARMv8, MAX_PAGE_ORDER is set up by CONFIG_ARCH_FORCE_MAX_ORDER
and CONFIG_PAGE_BLOCK_ORDER is also set up, so we need to take into account
CONFIG_PAGE_BLOCK_ORDER. For other architectures, the default will be:
CONFIG_ARCH_FORCE_MAX_ORDER = CONFIG_PAGE_BLOCK_ORDER.

Is there any valid case where the MAX_PAGE_ORDER needs to be smaller than
the page block order?

Thanks
Juan
>
> >    make[3]: Target 'prepare' not remade because of errors.
> >    make[2]: *** [Makefile:1275: prepare0] Error 2
> >    make[2]: Target 'prepare' not remade because of errors.
> >    make[1]: *** [Makefile:248: __sub-make] Error 2
> >    make[1]: Target 'prepare' not remade because of errors.
> >    make: *** [Makefile:248: __sub-make] Error 2
> >    make: Target 'prepare' not remade because of errors.
> >
> >
> > vim +53 include/linux/mmzone.h
> >
> >     46
> >     47        /*
> >     48         * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
> >     49         * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
> >     50         * which defines the order for the number of pages that can have a migrate type
> >     51         */
> >     52        #if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
> >   > 53        #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >     54        #endif
> >     55
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
>
>
> Best Regards,
> Yan, Zi

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-13 16:41     ` Juan Yescas
@ 2025-05-13 16:47       ` Zi Yan
  2025-05-13 16:52         ` Zi Yan
  2025-05-13 17:32         ` Juan Yescas
  0 siblings, 2 replies; 7+ messages in thread
From: Zi Yan @ 2025-05-13 16:47 UTC (permalink / raw)
  To: Juan Yescas
  Cc: Andrew Morton, kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On 13 May 2025, at 12:41, Juan Yescas wrote:

> On Tue, May 13, 2025 at 8:08 AM Zi Yan <ziy@nvidia.com> wrote:
>>
>> On 10 May 2025, at 13:16, kernel test robot wrote:
>>
>>> Hi Juan,
>>>
>>> kernel test robot noticed the following build errors:
>>>
>>> [auto build test ERROR on linus/master]
>>> [also build test ERROR on v6.15-rc5]
>>> [cannot apply to akpm-mm/mm-everything next-20250509]
>>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>>> And when submitting patch, we suggest to use '--base' as documented in
>>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>>>
>>> url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
>>> base:   linus/master
>>> patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
>>> patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
>>> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
>>> compiler: powerpc64-linux-gcc (GCC) 14.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
>>>
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    In file included from include/linux/gfp.h:7,
>>>                     from include/linux/xarray.h:16,
>>>                     from include/linux/list_lru.h:14,
>>>                     from include/linux/fs.h:14,
>>>                     from include/linux/compat.h:17,
>>>                     from arch/powerpc/kernel/asm-offsets.c:12:
>>>>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>          |  ^~~~~
>>>    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
>>
>> In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
>> the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
>> be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
>> set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.
>
> In ARMv8, MAX_PAGE_ORDER is set up by CONFIG_ARCH_FORCE_MAX_ORDER
> and CONFIG_PAGE_BLOCK_ORDER is also set up, so we need to take into account
> CONFIG_PAGE_BLOCK_ORDER. For other architectures, the default will be:
> CONFIG_ARCH_FORCE_MAX_ORDER = CONFIG_PAGE_BLOCK_ORDER.

It seems that the Kconfig “range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER”
is not working. The above powerpc-allmodconfig has CONFIG_ARCH_FORCE_MAX_ORDER
set to 8 and CONFIG_PAGE_BLOCK_ORDER is set to 10, leading to the compilation
error.

>
> Is there any valid case where the MAX_PAGE_ORDER needs to be smaller than
> the page block order?

I am not aware of any.

>
> Thanks
> Juan
>>
>>>    make[3]: Target 'prepare' not remade because of errors.
>>>    make[2]: *** [Makefile:1275: prepare0] Error 2
>>>    make[2]: Target 'prepare' not remade because of errors.
>>>    make[1]: *** [Makefile:248: __sub-make] Error 2
>>>    make[1]: Target 'prepare' not remade because of errors.
>>>    make: *** [Makefile:248: __sub-make] Error 2
>>>    make: Target 'prepare' not remade because of errors.
>>>
>>>
>>> vim +53 include/linux/mmzone.h
>>>
>>>     46
>>>     47        /*
>>>     48         * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
>>>     49         * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
>>>     50         * which defines the order for the number of pages that can have a migrate type
>>>     51         */
>>>     52        #if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
>>>   > 53        #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>     54        #endif
>>>     55
>>>
>>> --
>>> 0-DAY CI Kernel Test Service
>>> https://github.com/intel/lkp-tests/wiki
>>
>>
>> Best Regards,
>> Yan, Zi


Best Regards,
Yan, Zi

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-13 16:47       ` Zi Yan
@ 2025-05-13 16:52         ` Zi Yan
  2025-05-13 17:33           ` Juan Yescas
  2025-05-13 17:32         ` Juan Yescas
  1 sibling, 1 reply; 7+ messages in thread
From: Zi Yan @ 2025-05-13 16:52 UTC (permalink / raw)
  To: Juan Yescas
  Cc: Andrew Morton, kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On 13 May 2025, at 12:47, Zi Yan wrote:

> On 13 May 2025, at 12:41, Juan Yescas wrote:
>
>> On Tue, May 13, 2025 at 8:08 AM Zi Yan <ziy@nvidia.com> wrote:
>>>
>>> On 10 May 2025, at 13:16, kernel test robot wrote:
>>>
>>>> Hi Juan,
>>>>
>>>> kernel test robot noticed the following build errors:
>>>>
>>>> [auto build test ERROR on linus/master]
>>>> [also build test ERROR on v6.15-rc5]
>>>> [cannot apply to akpm-mm/mm-everything next-20250509]
>>>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>>>> And when submitting patch, we suggest to use '--base' as documented in
>>>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>>>>
>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
>>>> base:   linus/master
>>>> patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
>>>> patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
>>>> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
>>>> compiler: powerpc64-linux-gcc (GCC) 14.2.0
>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
>>>>
>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>>> the same patch/commit), kindly add following tags
>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
>>>>
>>>> All errors (new ones prefixed by >>):
>>>>
>>>>    In file included from include/linux/gfp.h:7,
>>>>                     from include/linux/xarray.h:16,
>>>>                     from include/linux/list_lru.h:14,
>>>>                     from include/linux/fs.h:14,
>>>>                     from include/linux/compat.h:17,
>>>>                     from arch/powerpc/kernel/asm-offsets.c:12:
>>>>>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>>       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>>          |  ^~~~~
>>>>    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
>>>
>>> In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
>>> the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
>>> be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
>>> set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.
>>
>> In ARMv8, MAX_PAGE_ORDER is set up by CONFIG_ARCH_FORCE_MAX_ORDER
>> and CONFIG_PAGE_BLOCK_ORDER is also set up, so we need to take into account
>> CONFIG_PAGE_BLOCK_ORDER. For other architectures, the default will be:
>> CONFIG_ARCH_FORCE_MAX_ORDER = CONFIG_PAGE_BLOCK_ORDER.
>
> It seems that the Kconfig “range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER”
> is not working. The above powerpc-allmodconfig has CONFIG_ARCH_FORCE_MAX_ORDER
> set to 8 and CONFIG_PAGE_BLOCK_ORDER is set to 10, leading to the compilation
> error.

You can get the same config by running “ARCH=powerpc make allmodconfig”.

>
>>
>> Is there any valid case where the MAX_PAGE_ORDER needs to be smaller than
>> the page block order?
>
> I am not aware of any.
>
>>
>> Thanks
>> Juan
>>>
>>>>    make[3]: Target 'prepare' not remade because of errors.
>>>>    make[2]: *** [Makefile:1275: prepare0] Error 2
>>>>    make[2]: Target 'prepare' not remade because of errors.
>>>>    make[1]: *** [Makefile:248: __sub-make] Error 2
>>>>    make[1]: Target 'prepare' not remade because of errors.
>>>>    make: *** [Makefile:248: __sub-make] Error 2
>>>>    make: Target 'prepare' not remade because of errors.
>>>>
>>>>
>>>> vim +53 include/linux/mmzone.h
>>>>
>>>>     46
>>>>     47        /*
>>>>     48         * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
>>>>     49         * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
>>>>     50         * which defines the order for the number of pages that can have a migrate type
>>>>     51         */
>>>>     52        #if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
>>>>   > 53        #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
>>>>     54        #endif
>>>>     55
>>>>
>>>> --
>>>> 0-DAY CI Kernel Test Service
>>>> https://github.com/intel/lkp-tests/wiki
>>>
>>>
>>> Best Regards,
>>> Yan, Zi
>
>
> Best Regards,
> Yan, Zi


Best Regards,
Yan, Zi

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-13 16:47       ` Zi Yan
  2025-05-13 16:52         ` Zi Yan
@ 2025-05-13 17:32         ` Juan Yescas
  1 sibling, 0 replies; 7+ messages in thread
From: Juan Yescas @ 2025-05-13 17:32 UTC (permalink / raw)
  To: Zi Yan
  Cc: Andrew Morton, kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On Tue, May 13, 2025 at 9:47 AM Zi Yan <ziy@nvidia.com> wrote:
>
> On 13 May 2025, at 12:41, Juan Yescas wrote:
>
> > On Tue, May 13, 2025 at 8:08 AM Zi Yan <ziy@nvidia.com> wrote:
> >>
> >> On 10 May 2025, at 13:16, kernel test robot wrote:
> >>
> >>> Hi Juan,
> >>>
> >>> kernel test robot noticed the following build errors:
> >>>
> >>> [auto build test ERROR on linus/master]
> >>> [also build test ERROR on v6.15-rc5]
> >>> [cannot apply to akpm-mm/mm-everything next-20250509]
> >>> [If your patch is applied to the wrong git tree, kindly drop us a note.
> >>> And when submitting patch, we suggest to use '--base' as documented in
> >>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >>>
> >>> url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
> >>> base:   linus/master
> >>> patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
> >>> patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
> >>> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
> >>> compiler: powerpc64-linux-gcc (GCC) 14.2.0
> >>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
> >>>
> >>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >>> the same patch/commit), kindly add following tags
> >>> | Reported-by: kernel test robot <lkp@intel.com>
> >>> | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
> >>>
> >>> All errors (new ones prefixed by >>):
> >>>
> >>>    In file included from include/linux/gfp.h:7,
> >>>                     from include/linux/xarray.h:16,
> >>>                     from include/linux/list_lru.h:14,
> >>>                     from include/linux/fs.h:14,
> >>>                     from include/linux/compat.h:17,
> >>>                     from arch/powerpc/kernel/asm-offsets.c:12:
> >>>>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>          |  ^~~~~
> >>>    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
> >>
> >> In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
> >> the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
> >> be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
> >> set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.
> >
> > In ARMv8, MAX_PAGE_ORDER is set up by CONFIG_ARCH_FORCE_MAX_ORDER
> > and CONFIG_PAGE_BLOCK_ORDER is also set up, so we need to take into account
> > CONFIG_PAGE_BLOCK_ORDER. For other architectures, the default will be:
> > CONFIG_ARCH_FORCE_MAX_ORDER = CONFIG_PAGE_BLOCK_ORDER.
>
> It seems that the Kconfig “range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER”
> is not working. The above powerpc-allmodconfig has CONFIG_ARCH_FORCE_MAX_ORDER
> set to 8 and CONFIG_PAGE_BLOCK_ORDER is set to 10, leading to the compilation
> error.
>

Right, Kconfig restriction is being ignored by powerpc, however, it is
respected by ARMv8.

The main difference that I see between arch/arm64/Kconfig and
arch/powerpc/Kconfig
is that powerpc/Kconfig is using ranges, but not in arm64/Kconfig

https://elixir.bootlin.com/linux/v6.14.6/source/arch/arm64/Kconfig#L1637
config ARCH_FORCE_MAX_ORDER
int
default "13" if ARM64_64K_PAGES
default "11" if ARM64_16K_PAGES
default "10"

https://elixir.bootlin.com/linux/v6.14.6/source/arch/powerpc/Kconfig#L918
config ARCH_FORCE_MAX_ORDER
int "Order of maximal physically contiguous allocations"
range 7 8 if PPC64 && PPC_64K_PAGES
default "8" if PPC64 && PPC_64K_PAGES
range 12 12 if PPC64 && !PPC_64K_PAGES
default "12" if PPC64 && !PPC_64K_PAGES
range 8 10 if PPC32 && PPC_16K_PAGES

> >
> > Is there any valid case where the MAX_PAGE_ORDER needs to be smaller than
> > the page block order?
>
> I am not aware of any.
>
> >
> > Thanks
> > Juan
> >>
> >>>    make[3]: Target 'prepare' not remade because of errors.
> >>>    make[2]: *** [Makefile:1275: prepare0] Error 2
> >>>    make[2]: Target 'prepare' not remade because of errors.
> >>>    make[1]: *** [Makefile:248: __sub-make] Error 2
> >>>    make[1]: Target 'prepare' not remade because of errors.
> >>>    make: *** [Makefile:248: __sub-make] Error 2
> >>>    make: Target 'prepare' not remade because of errors.
> >>>
> >>>
> >>> vim +53 include/linux/mmzone.h
> >>>
> >>>     46
> >>>     47        /*
> >>>     48         * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
> >>>     49         * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
> >>>     50         * which defines the order for the number of pages that can have a migrate type
> >>>     51         */
> >>>     52        #if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
> >>>   > 53        #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>     54        #endif
> >>>     55
> >>>
> >>> --
> >>> 0-DAY CI Kernel Test Service
> >>> https://github.com/intel/lkp-tests/wiki
> >>
> >>
> >> Best Regards,
> >> Yan, Zi
>
>
> Best Regards,
> Yan, Zi

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

* Re: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
  2025-05-13 16:52         ` Zi Yan
@ 2025-05-13 17:33           ` Juan Yescas
  0 siblings, 0 replies; 7+ messages in thread
From: Juan Yescas @ 2025-05-13 17:33 UTC (permalink / raw)
  To: Zi Yan
  Cc: Andrew Morton, kernel test robot, linux-kernel, oe-kbuild-all,
	Linux Memory Management List, tjmercier, isaacmanjarres, surenb,
	kaleshsingh, Vlastimil Babka, Liam R. Howlett, Lorenzo Stoakes,
	David Hildenbrand, Mike Rapoport, Minchan Kim

On Tue, May 13, 2025 at 9:52 AM Zi Yan <ziy@nvidia.com> wrote:
>
> On 13 May 2025, at 12:47, Zi Yan wrote:
>
> > On 13 May 2025, at 12:41, Juan Yescas wrote:
> >
> >> On Tue, May 13, 2025 at 8:08 AM Zi Yan <ziy@nvidia.com> wrote:
> >>>
> >>> On 10 May 2025, at 13:16, kernel test robot wrote:
> >>>
> >>>> Hi Juan,
> >>>>
> >>>> kernel test robot noticed the following build errors:
> >>>>
> >>>> [auto build test ERROR on linus/master]
> >>>> [also build test ERROR on v6.15-rc5]
> >>>> [cannot apply to akpm-mm/mm-everything next-20250509]
> >>>> [If your patch is applied to the wrong git tree, kindly drop us a note.
> >>>> And when submitting patch, we suggest to use '--base' as documented in
> >>>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >>>>
> >>>> url:    https://github.com/intel-lab-lkp/linux/commits/Juan-Yescas/mm-Add-CONFIG_PAGE_BLOCK_ORDER-to-select-page-block-order/20250510-090501
> >>>> base:   linus/master
> >>>> patch link:    https://lore.kernel.org/r/20250510010338.3978696-1-jyescas%40google.com
> >>>> patch subject: [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
> >>>> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/config)
> >>>> compiler: powerpc64-linux-gcc (GCC) 14.2.0
> >>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250511/202505110035.wtOWnL8o-lkp@intel.com/reproduce)
> >>>>
> >>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >>>> the same patch/commit), kindly add following tags
> >>>> | Reported-by: kernel test robot <lkp@intel.com>
> >>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202505110035.wtOWnL8o-lkp@intel.com/
> >>>>
> >>>> All errors (new ones prefixed by >>):
> >>>>
> >>>>    In file included from include/linux/gfp.h:7,
> >>>>                     from include/linux/xarray.h:16,
> >>>>                     from include/linux/list_lru.h:14,
> >>>>                     from include/linux/fs.h:14,
> >>>>                     from include/linux/compat.h:17,
> >>>>                     from arch/powerpc/kernel/asm-offsets.c:12:
> >>>>>> include/linux/mmzone.h:53:2: error: #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>>       53 | #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>>          |  ^~~~~
> >>>>    make[3]: *** [scripts/Makefile.build:98: arch/powerpc/kernel/asm-offsets.s] Error 1
> >>>
> >>> In this config, CONFIG_ARCH_FORCE_MAX_ORDER is set to 8, lower than
> >>> the default PAGE_BLOCK_ORDER value, 10. I wonder if the error should
> >>> be changed to ignore CONFIG_PAGE_BLOCK_ORDER when MAX_PAGE_ORDER is
> >>> set by CONFIG_ARCH_FORCE_MAX_ORDER and give a warning instead.
> >>
> >> In ARMv8, MAX_PAGE_ORDER is set up by CONFIG_ARCH_FORCE_MAX_ORDER
> >> and CONFIG_PAGE_BLOCK_ORDER is also set up, so we need to take into account
> >> CONFIG_PAGE_BLOCK_ORDER. For other architectures, the default will be:
> >> CONFIG_ARCH_FORCE_MAX_ORDER = CONFIG_PAGE_BLOCK_ORDER.
> >
> > It seems that the Kconfig “range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER”
> > is not working. The above powerpc-allmodconfig has CONFIG_ARCH_FORCE_MAX_ORDER
> > set to 8 and CONFIG_PAGE_BLOCK_ORDER is set to 10, leading to the compilation
> > error.
>
> You can get the same config by running “ARCH=powerpc make allmodconfig”.
>

Thanks, that works!

> >
> >>
> >> Is there any valid case where the MAX_PAGE_ORDER needs to be smaller than
> >> the page block order?
> >
> > I am not aware of any.
> >
> >>
> >> Thanks
> >> Juan
> >>>
> >>>>    make[3]: Target 'prepare' not remade because of errors.
> >>>>    make[2]: *** [Makefile:1275: prepare0] Error 2
> >>>>    make[2]: Target 'prepare' not remade because of errors.
> >>>>    make[1]: *** [Makefile:248: __sub-make] Error 2
> >>>>    make[1]: Target 'prepare' not remade because of errors.
> >>>>    make: *** [Makefile:248: __sub-make] Error 2
> >>>>    make: Target 'prepare' not remade because of errors.
> >>>>
> >>>>
> >>>> vim +53 include/linux/mmzone.h
> >>>>
> >>>>     46
> >>>>     47        /*
> >>>>     48         * The MAX_PAGE_ORDER, which defines the max order of pages to be allocated
> >>>>     49         * by the buddy allocator, has to be larger or equal to the PAGE_BLOCK_ORDER,
> >>>>     50         * which defines the order for the number of pages that can have a migrate type
> >>>>     51         */
> >>>>     52        #if (PAGE_BLOCK_ORDER > MAX_PAGE_ORDER)
> >>>>   > 53        #error MAX_PAGE_ORDER must be >= PAGE_BLOCK_ORDER
> >>>>     54        #endif
> >>>>     55
> >>>>
> >>>> --
> >>>> 0-DAY CI Kernel Test Service
> >>>> https://github.com/intel/lkp-tests/wiki
> >>>
> >>>
> >>> Best Regards,
> >>> Yan, Zi
> >
> >
> > Best Regards,
> > Yan, Zi
>
>
> Best Regards,
> Yan, Zi

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

end of thread, other threads:[~2025-05-13 17:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250510010338.3978696-1-jyescas@google.com>
2025-05-10 17:16 ` [PATCH v4] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order kernel test robot
2025-05-13 15:08   ` Zi Yan
2025-05-13 16:41     ` Juan Yescas
2025-05-13 16:47       ` Zi Yan
2025-05-13 16:52         ` Zi Yan
2025-05-13 17:33           ` Juan Yescas
2025-05-13 17:32         ` Juan Yescas

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