lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] mm, treewide: Redefine MAX_ORDER sanely
On 03/15/23 14:31, Kirill A. Shutemov wrote:
> MAX_ORDER currently defined as number of orders page allocator supports:
> user can ask buddy allocator for page order between 0 and MAX_ORDER-1.
>
> This definition is counter-intuitive and lead to number of bugs all over
> the kernel.
>
> Change the definition of MAX_ORDER to be inclusive: the range of orders
> user can ask from buddy allocator is 0..MAX_ORDER now.
>
> --- a/arch/arc/Kconfig
> +++ b/arch/arc/Kconfig
> @@ -556,7 +556,7 @@ endmenu # "ARC Architecture Configuration"
>
> config ARCH_FORCE_MAX_ORDER
> int "Maximum zone order"
> - default "12" if ARC_HUGEPAGE_16M
> - default "11"
> + default "11" if ARC_HUGEPAGE_16M
> + default "10"

Is this Kconfig file wrong (off by 1) today? It seems like it wants MAX_ORDER
to be sufficiently large to allocate 16M if ARC_HUGEPAGE_16M. So, seems like
it should be 13 today?

--
Mike Kravetz

\
 
 \ /
  Last update: 2023-03-27 01:04    [W:0.378 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site