Re: [PATCH] mm: drop stale MAX_ORDER references

From: Zi Yan

Date: Thu Aug 20 2026 - 09:52:18 EST


On 20 Aug 2026, at 9:27, Kiryl Shutsemau wrote:

> On Tue, Aug 18, 2026 at 08:24:08PM +0800, 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 <xiqi2@xxxxxxxxxx>
>> ---
>> 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
>
> Should it reference MAX_ORDER_NR_PAGES instead?

It is fixed in v2[1].

[1] https://lore.kernel.org/all/20260819082052.3338603-1-xiqi2@xxxxxxxxxx/

>
>> + * 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
>
> --
> Kiryl Shutsemau / Kirill A. Shutemov


Best Regards,
Yan, Zi