From: Yury Norov <yury.norov@gmail.com>
To: Sang-Heon Jeon <ekffu200098@gmail.com>
Cc: Yury Norov <yury.norov@gmail.com>,
akpm@linux-foundation.org,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
linux-mm@kvack.org, Andreas Larsson <andreas@gaisler.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Nicholas Piggin <npiggin@gmail.com>,
Rich Felker <dalias@libc.org>,
Vlastimil Babka <vbabka@kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH 3/4] powerpc/numa: set node_possible_map from node_online_map
Date: Thu, 2 Jul 2026 02:35:10 -0400 [thread overview]
Message-ID: <akYGnq1AMLCfIdgl@yury> (raw)
In-Reply-To: <CABFDxMGvQG++qRbh2UuDsRCX4910BGA+2j5+5jcm0hJMgSTSqw@mail.gmail.com>
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 <yury.norov@gmail.com> 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 <ekffu200098@gmail.com>
> > > ---
> > > 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
next prev parent reply other threads:[~2026-07-02 6:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 17:18 [PATCH 0/4] treewide, mm: initialize node_possible_map like the other node maps Sang-Heon Jeon
2026-07-01 17:18 ` [PATCH 1/4] sparc64: set node_possible_map in bootmem_init_numa() Sang-Heon Jeon
2026-07-01 17:18 ` [PATCH 2/4] sh: set node_possible_map in do_init_bootmem() Sang-Heon Jeon
2026-07-01 17:18 ` [PATCH 3/4] powerpc/numa: set node_possible_map from node_online_map Sang-Heon Jeon
2026-07-01 20:55 ` Yury Norov
2026-07-02 3:57 ` Sang-Heon Jeon
2026-07-02 6:35 ` Yury Norov [this message]
2026-07-01 17:18 ` [PATCH 4/4] mm/page_alloc: initialize node_possible_map like the other node maps 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=akYGnq1AMLCfIdgl@yury \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreas@gaisler.com \
--cc=chleroy@kernel.org \
--cc=dalias@libc.org \
--cc=davem@davemloft.net \
--cc=ekffu200098@gmail.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=vbabka@kernel.org \
--cc=ysato@users.sourceforge.jp \
/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