From: Byungchul Park <byungchul@sk.com>
To: Oscar Salvador <osalvador@suse.de>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kernel_team@skhynix.com, akpm@linux-foundation.org
Subject: Re: [PATCH] sched/numa, mm: do not promote folios to nodes not set N_MEMORY
Date: Fri, 16 Feb 2024 18:11:40 +0900 [thread overview]
Message-ID: <20240216091139.GA75176@system.software.com> (raw)
In-Reply-To: <Zc8UPuzii_5gTsrJ@localhost.localdomain>
On Fri, Feb 16, 2024 at 08:52:30AM +0100, Oscar Salvador wrote:
> On Fri, Feb 16, 2024 at 04:07:54PM +0900, Byungchul Park wrote:
> > For normal numa nodes, node_data[] is initialized at alloc_node_data(),
> > but it's not for memoryless node. However, the node *gets onlined* at
> > init_cpu_to_node().
> >
> > Let's look at back free_area_init(). free_area_init_node() will be called
> > with node_data[] not set yet, because it's already *onlined*. So
> > ->zone_pgdat cannot be initialized properly in the path you mentioned.
>
> I am might be missing something., so bear with me.
>
> free_area_init() gets called before init_cpu_to_node() does.
> free_area_init_node() gets called on every possible node.
>
> free_area_init_node then() does
>
> pg_data_t *pgdat = NODE_DATA(nid);,
>
> and then we call free_area_init_core().
>
> free_area_init_core() does
>
> free_area_init_core() does
> zone_init_internals()
>
> which ends up doing zone->zone_pgdat = NODE_DATA(nid);
>
> If node_data[] was not set at all, we would already blow up when doing
> the first
>
> for_each_node()
> pgdat = NODE_DATA(nid);
> free_area_init_node(nid);
>
> back in free_area_init().
It seems that I got it wrong about the reason. Let me check it again and
share the reason.
Just in case, this patch is still definitely necessary tho.
Byungchul
next prev parent reply other threads:[~2024-02-16 9:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 3:53 [PATCH] sched/numa, mm: do not promote folios to nodes not set N_MEMORY Byungchul Park
2024-02-14 12:31 ` Phil Auld
2024-02-14 20:03 ` Phil Auld
2024-02-16 7:45 ` Byungchul Park
2024-02-16 5:26 ` Byungchul Park
2024-02-14 21:13 ` Oscar Salvador
2024-02-16 7:07 ` Byungchul Park
2024-02-16 7:52 ` Oscar Salvador
2024-02-16 9:11 ` Byungchul Park [this message]
2024-02-16 9:23 ` Byungchul Park
2024-02-16 11:26 ` Byungchul Park
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=20240216091139.GA75176@system.software.com \
--to=byungchul@sk.com \
--cc=akpm@linux-foundation.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kernel_team@skhynix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=osalvador@suse.de \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox