From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Danilo Krummrich <dakr@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Huacai Chen <chenhuacai@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Mike Rapoport <rppt@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Thomas Gleixner <tglx@kernel.org>
Cc: Sang-Heon Jeon <ekffu200098@gmail.com>,
devicetree@vger.kernel.org, driver-core@lists.linux.dev,
"H. Peter Anvin" <hpa@zytor.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-mm@kvack.org,
loongarch@lists.linux.dev, WANG Xuerui <kernel@xen0n.name>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/9] treewide, numa_memblks: remove redundant work during NUMA init
Date: Sun, 28 Jun 2026 22:58:14 +0900 [thread overview]
Message-ID: <20260628135828.1393120-1-ekffu200098@gmail.com> (raw)
Every existing numa_add_memblk() caller passes a valid node id and
separately marks that node in numa_nodes_parsed with node_set(). In
addition, numa_nodemask_from_meminfo() recomputes the same "nodes that own
memory" set from numa_meminfo, which numa_nodes_parsed already contains.
This redundancy implicitly depends on the callers' node_set(). So, before
removing the redundancy, make numa_add_memblk() set the node in
numa_nodes_parsed explicitly. Then remove the per-caller node_set() and
numa_nodemask_from_meminfo().
Also, since the generic numa_register_meminfo() already sets
node_possible_map to numa_nodes_parsed, remove the duplicate assignment in
arch_numa's numa_register_nodes().
Patch 1 adds the node_set() to numa_add_memblk() itself, so every memblk's
node is set in numa_nodes_parsed on add.
Patches 2-6 depend on patch 1 and remove the redundant per-caller node_set()
from all callers.
Patch 7 removes both numa_nodemask_from_meminfo() call sites and the unused
function itself.
Patch 8 removes the duplicate node_possible_map assignment in arch_numa.
Patch 9 is a minor cleanup, using the existing numa_add_reserved_memblk()
wrapper in numa_cleanup_meminfo().
No functional change.
Sang-Heon Jeon (9):
mm: numa_memblks: set numa_nodes_parsed in numa_add_memblk()
ACPI: NUMA: remove redundant numa_nodes_parsed node_set()
of/numa: remove redundant numa_nodes_parsed node_set()
x86/numa: remove redundant numa_nodes_parsed node_set()
arch_numa: remove redundant numa_nodes_parsed node_set()
LoongArch: remove redundant numa_nodes_parsed node_set()
mm: numa_memblks: remove redundant numa_nodemask_from_meminfo()
arch_numa: remove redundant node_possible_map assignment
mm: numa_memblks: use numa_add_reserved_memblk() in
numa_cleanup_meminfo()
arch/loongarch/kernel/numa.c | 1 -
arch/x86/mm/amdtopology.c | 1 -
arch/x86/mm/numa.c | 1 -
drivers/acpi/numa/srat.c | 2 --
drivers/base/arch_numa.c | 4 ----
drivers/of/of_numa.c | 5 +----
mm/numa_memblks.c | 41 +++++++++++++++---------------------
7 files changed, 18 insertions(+), 37 deletions(-)
--
2.43.0
next reply other threads:[~2026-06-28 13:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-28 13:58 Sang-Heon Jeon [this message]
2026-06-28 13:58 ` [PATCH 5/9] arch_numa: remove redundant numa_nodes_parsed node_set() Sang-Heon Jeon
2026-06-28 13:58 ` [PATCH 8/9] arch_numa: remove redundant node_possible_map assignment Sang-Heon Jeon
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=20260628135828.1393120-1-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=chenhuacai@kernel.org \
--cc=dakr@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kernel@xen0n.name \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rppt@kernel.org \
--cc=saravanak@kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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