[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220203002116.akpk5um5nkpeflve@master>
Date: Thu, 3 Feb 2022 00:21:16 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Michal Hocko <mhocko@...e.com>
Cc: Wei Yang <richard.weiyang@...il.com>,
Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>,
David Hildenbrand <david@...hat.com>,
Alexey Makhalov <amakhalov@...are.com>,
Dennis Zhou <dennis@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Oscar Salvador <osalvador@...e.de>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Nico Pache <npache@...hat.com>,
Rafael Aquini <raquini@...hat.com>
Subject: Re: [PATCH 2/6] mm: handle uninitialized numa nodes gracefully
On Tue, Feb 01, 2022 at 10:54:37AM +0100, Michal Hocko wrote:
>On Tue 01-02-22 02:41:19, Wei Yang wrote:
>> On Thu, Jan 27, 2022 at 03:47:40PM +0100, Michal Hocko wrote:
>> [...]
>> >> > + /*
>> >> > + * not marking this node online because we do not want to
>> >> > + * confuse userspace by sysfs files/directories for node
>> >> > + * without any memory attached to it (see topology_init)
>> >> > + * The pgdat will get fully initialized when a memory is
>> >> > + * hotpluged into it by hotadd_init_pgdat
>> >> > + */
>>
>> Hmm... which following step would mark the node online? On x86, the node is
>> onlined in alloc_node_date(). This is not onlined here.
>
>The comment tries to explain that this happens during the memory
>hotplug. Or maybe I have missed your question?
>
I am not sure for others, while the comment confused me a little.
Currently in kernel, there are two situations for node online:
* during memory hotplug
* during sys-init
For memory hotplug, we allocate pgdat and online node. And current hot-add
process has already put them in two steps:
1. __try_online_node()
2. node_set_online()
So emphasize "not online" node here, confuse me a little. It is a natural
thing to not online node until it has memory.
But from another point of view, the comment here is reasonable. During
sys-init, we online node at the same time when creating pgdat. And even for
memory-less node on x86, we online them too.
Well, this is all about the comment. I have tried to grab may head but not
come up with a better idea.
Or maybe this is just my personal feeling, don't bother if no-one else feel
like this.
>[...]
>--
>Michal Hocko
>SUSE Labs
--
Wei Yang
Help you, Help me
Powered by blists - more mailing lists