Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Qi Xi" <xiqi2@huawei.com>
Cc: linux-hyperv@vger.kernel.org
Subject: Re: [PATCH] mm: drop stale MAX_ORDER references
Date: Wed, 19 Aug 2026 12:39:54 +0000	[thread overview]
Message-ID: <20260819123954.C2A061F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260818122408.4182417-1-xiqi2@huawei.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Blind text replacement in a comment causes the documented mathematical formula for maximum page allocation size to be halved.
--

--- Patch [1]: [PATCH] mm: drop stale MAX_ORDER references ---
commit dbb29499acbd8adcdd7b1a04573e7581c99841f4
Author: Qi Xi <xiqi2@huawei.com>

mm: drop stale MAX_ORDER references

This commit renames leftover instances of MAX_ORDER to MAX_PAGE_ORDER across
the tree, including comments and gdb helper scripts, to maintain consistency
after the treewide rename.

> diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
> index 04acb6791dbd9..1d5bed71d6a7e 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
> + * buffer size beyond this value gets rejected by __alloc_page() call.

[Severity: Low]
Does this direct text replacement inadvertently halve the documented
maximum page allocation size?

The old formula used 2^(MAX_ORDER - 1). Because MAX_PAGE_ORDER is an
inclusive limit that is one less than the old exclusive MAX_ORDER, evaluating
2^(MAX_PAGE_ORDER - 1) results in half the actual maximum pages.

Should this formula be updated to just 2^MAX_PAGE_ORDER instead?

>   */
>  #define MAX_RX_BUFFERS_PER_QUEUE 8192
>  #define DEF_RX_BUFFERS_PER_QUEUE 1024

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260818122408.4182417-1-xiqi2@huawei.com?part=1

      parent reply	other threads:[~2026-08-19 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 12:24 [PATCH] mm: drop stale MAX_ORDER references Qi Xi
2026-08-18 19:19 ` Zi Yan
2026-08-19 12:39 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819123954.C2A061F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=xiqi2@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox