From: Mike Rapoport <rppt@kernel.org>
To: Kaitao Cheng <kaitao.cheng@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
Lorenzo Stoakes <ljs@kernel.org>,
Priyanshu Kumar <priyanshukumarpu@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] memblock: Remove unused exact nid allocation API
Date: Thu, 17 Sep 2026 12:44:52 +0300 [thread overview]
Message-ID: <aqu2lCK5Nkw-9fHW@kernel.org> (raw)
In-Reply-To: <20260917081504.30426-1-kaitao.cheng@linux.dev>
On Thu, Sep 17, 2026 at 04:15:02PM +0800, Kaitao Cheng wrote:
> This series follows the removal of the unused exact_nid argument from
> memmap_alloc(). That change removed the last in-kernel caller of
> memblock_alloc_exact_nid_raw(), leaving only the memblock simulator
> tests using the function.
Please resend the patch that removed exact_nid from memmap_alloc() and
these patches as a single set.
> The first patch moves the applicable exact-node allocation tests to
> memblock_alloc_range_nid(). The second patch removes
> memblock_alloc_exact_nid_raw() and drops the exact_nid argument from
> memblock_alloc_internal(), as all of its remaining callers allow
> fallback to other NUMA nodes.
>
> The investigation cannot be extended to removing the exact_nid argument
> from memblock_alloc_range_nid(). CMA passes true when reserving per-node
> CMA areas. Allowing such an allocation to fall back to another node
> could leave the CMA area's recorded nid inconsistent with the physical
> location of its memory. KHO also passes true when allocating per-node
> scratch areas and requires those allocations to remain on the requested
> node.
>
> Since exact-node allocation remains a required behavior of
> memblock_alloc_range_nid(), deleting all of the tests in
> alloc_exact_nid_api.c would remove useful coverage. Preserve the
> applicable NUMA tests by making them call memblock_alloc_range_nid()
> directly with exact_nid set.
>
> Some tests cannot be preserved unchanged because they exercise
> memblock_alloc_internal() retrying below min_addr. Unlike
> memblock_alloc_internal(), memblock_alloc_range_nid() treats its start
> address as a hard boundary and does not retry from address zero. Remove
> those tests together with the now-unused TEST_F_EXACT dispatch from the
> shared allocation tests.
>
> Kaitao Cheng (2):
> memblock tests: Move exact nid tests to memblock_alloc_range_nid()
> memblock: Remove unused memblock_alloc_exact_nid_raw()
>
> include/linux/memblock.h | 3 -
> mm/memblock.c | 44 +-
> .../memblock/tests/alloc_exact_nid_api.c | 454 ++----------------
> tools/testing/memblock/tests/alloc_nid_api.c | 20 -
> tools/testing/memblock/tests/alloc_nid_api.h | 1 -
> tools/testing/memblock/tests/common.h | 2 -
> 6 files changed, 42 insertions(+), 482 deletions(-)
>
> --
> 2.54.0 (Apple Git-157)
>
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2026-09-17 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 8:15 [PATCH 0/2] memblock: Remove unused exact nid allocation API Kaitao Cheng
2026-09-17 8:15 ` [PATCH 1/2] memblock tests: Move exact nid tests to memblock_alloc_range_nid() Kaitao Cheng
2026-09-17 8:15 ` [PATCH 2/2] memblock: Remove unused memblock_alloc_exact_nid_raw() Kaitao Cheng
2026-09-17 9:44 ` Mike Rapoport [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=aqu2lCK5Nkw-9fHW@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=kaitao.cheng@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=muchun.song@linux.dev \
--cc=priyanshukumarpu@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.