On Tue Aug 18, 2026 at 8:24 AM EDT, Qi Xi wrote:
> The treewide rename in commit 5e0a760b4441 ("mm, treewide: rename
> MAX_ORDER to MAX_PAGE_ORDER") left a few spots still using the old
> name:
>
>   - two comments in include/net/mana/mana.h and mm/page_alloc.c;
>   - the gdb helper scripts/gdb/linux/mm.py, where self.MAX_ORDER is
>     a local mirror of the kernel's MAX_ORDER define.
>
> Rename the leftover instances to MAX_PAGE_ORDER so the tree is
> consistent.
>
> No functional changes.
>
> Signed-off-by: Qi Xi <[email protected]>
> ---
>  include/net/mana/mana.h | 4 ++--
>  mm/page_alloc.c         | 2 +-
>  scripts/gdb/linux/mm.py | 8 ++++----
>  3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
> index 04acb6791dbd..1d5bed71d6a7 100644
> --- a/include/net/mana/mana.h
> +++ b/include/net/mana/mana.h
> @@ -40,8 +40,8 @@ enum TRI_STATE {
>  #define COMP_ENTRY_SIZE 64
>  
>  /* This Max value for RX buffers is derived from __alloc_page()'s max page
> - * allocation calculation. It allows maximum 2^(MAX_ORDER -1) pages. RX 
> buffer
> - * size beyond this value gets rejected by __alloc_page() call.
> + * allocation calculation. It allows maximum 2^(MAX_PAGE_ORDER -1) pages. RX

It should be 2^MAX_PAGE_ORDER here, since MAX_PAGE_ORDER is inclusive
now.

> + * buffer size beyond this value gets rejected by __alloc_page() call.
>   */
>  #define MAX_RX_BUFFERS_PER_QUEUE 8192
>  #define DEF_RX_BUFFERS_PER_QUEUE 1024
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ee902a468c2f..42b5b41432c5 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -7803,7 +7803,7 @@ static bool cond_accept_memory(struct zone *zone, 
> unsigned int order,
>       /*
>        * Watermarks have not been initialized yet.
>        *
> -      * Accepting one MAX_ORDER page to ensure progress.
> +      * Accepting one MAX_PAGE_ORDER page to ensure progress.
>        */
>       if (!wmark)
>               return try_to_accept_memory_one(zone);
> diff --git a/scripts/gdb/linux/mm.py b/scripts/gdb/linux/mm.py
> index dffadccbb01d..28d33624c38b 100644
> --- a/scripts/gdb/linux/mm.py
> +++ b/scripts/gdb/linux/mm.py
> @@ -56,7 +56,7 @@ class x86_page_ops():
>  
>          self.MAX_PHYSMEM_BITS = 46
>          self.SECTION_SIZE_BITS = 27
> -        self.MAX_ORDER = 10
> +        self.MAX_PAGE_ORDER = 10
>  
>          self.SECTIONS_SHIFT = self.MAX_PHYSMEM_BITS - self.SECTION_SIZE_BITS
>          self.NR_MEM_SECTIONS = 1 << self.SECTIONS_SHIFT
> @@ -233,11 +233,11 @@ class aarch64_page_ops():
>          self.SECTIONS_SHIFT = self.MAX_PHYSMEM_BITS - self.SECTION_SIZE_BITS
>  
>          if str(constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER).isdigit():
> -            self.MAX_ORDER = constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER
> +            self.MAX_PAGE_ORDER = constants.LX_CONFIG_ARCH_FORCE_MAX_ORDER
>          else:
> -            self.MAX_ORDER = 10
> +            self.MAX_PAGE_ORDER = 10
>  
> -        self.MAX_ORDER_NR_PAGES = 1 << (self.MAX_ORDER)
> +        self.MAX_ORDER_NR_PAGES = 1 << (self.MAX_PAGE_ORDER)
>          self.PFN_SECTION_SHIFT = self.SECTION_SIZE_BITS - self.PAGE_SHIFT
>          self.NR_MEM_SECTIONS = 1 << self.SECTIONS_SHIFT
>          self.PAGES_PER_SECTION = 1 << self.PFN_SECTION_SHIFT

The rest looks good to me.

With the comment in mana.h fixed, feel free to add

Reviewed-by: Zi Yan <[email protected]>


-- 
Best Regards,
Yan, Zi


Reply via email to