Thread (5 messages) 5 messages, 2 authors, 1d ago

Re: [PATCH 3/4] powerpc/numa: set node_possible_map from node_online_map

From: Sang-Heon Jeon <hidden>
Date: 2026-07-02 03:58:08
Also in: lkml

Hi Yury,

On Thu, Jul 2, 2026 at 5:55 AM Yury Norov [off-list ref] wrote:
On Thu, Jul 02, 2026 at 02:18:50AM +0900, Sang-Heon Jeon wrote:
quoted
mem_topology_setup() intersects node_possible_map with node_online_map.
Nothing sets node_possible_map before this, so it is NODE_MASK_ALL and
the result is just node_online_map.

In preparation for changing node_possible_map's initial value,
mem_topology_setup() no longer depends on it.

No functional change.

Signed-off-by: Sang-Heon Jeon <redacted>
---
 arch/powerpc/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f4cf3ae036de..2fdecae90a01 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1179,7 +1179,7 @@ void __init mem_topology_setup(void)
       * that we expect to make use of for this platform's affinity
       * calculations.
       */
-     nodes_and(node_possible_map, node_possible_map, node_online_map);
+     node_possible_map = node_online_map;

      find_possible_nodes();
And in find_possible_nodes():

         for (i = 0; i < max_nodes; i++) {
                 if (!node_possible(i))
                         node_set(i, node_possible_map);
         }

So, assuming the code reaches to that point, you unconditionally
online all the offlined nodes.
This loop only sets bits in node_possible_map, not in node_online_map,
so I can't find how it onlines the offlined nodes unexpectedly. Please
correct me if I'm wrong or missing something.

Or are you talking about the case where max_nodes exceeds
MAX_NUMNODES, which was also noticed by sashiko? I think it is a
pre-existing issue, and this patch does not affect it.
This doesn't look correct at the first glance, and definitely it's not
a "No functional change" type of things.
Best Regards,
Sang-Heon Jeon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help