On Thu, Jul 02, 2026 at 12:57:46PM +0900, Sang-Heon Jeon wrote: > Hi Yury, > > On Thu, Jul 2, 2026 at 5:55 AM Yury Norov <[email protected]> wrote: > > > > On Thu, Jul 02, 2026 at 02:18:50AM +0900, Sang-Heon Jeon wrote: > > > 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 <[email protected]> > > > --- > > > 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.
Oops, sorry, It's my bad. They are nodemask_t, not pointers, so in "node_possible_map = node_online_map" you copy by value. Thanks, Yury
