lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2017 16:13:16 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Jerome Glisse <jglisse@...hat.com>,
        Reza Arbab <arbab@...ux.vnet.ibm.com>,
        Yasuaki Ishimatsu <yasu.isimatu@...il.com>,
        qiuxishi@...wei.com, Kani Toshimitsu <toshi.kani@....com>,
        slaoub@...il.com, Joonsoo Kim <js1304@...il.com>,
        Andi Kleen <ak@...ux.intel.com>,
        David Rientjes <rientjes@...gle.com>,
        Daniel Kiper <daniel.kiper@...cle.com>,
        Igor Mammedov <imammedo@...hat.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/9] mm, memory_hotplug: split up register_one_node

On Thu 13-04-17 16:05:17, Vlastimil Babka wrote:
> On 04/10/2017 01:03 PM, Michal Hocko wrote:
> > From: Michal Hocko <mhocko@...e.com>
> > 
> > Memory hotplug (add_memory_resource) has to reinitialize node
> > infrastructure if the node is offline (one which went through the
> > complete add_memory(); remove_memory() cycle). That involves node
> > registration to the kobj infrastructure (register_node), the proper
> > association with cpus (register_cpu_under_node) and finally creation of
> > node<->memblock symlinks (link_mem_sections).
> > 
> > The last part requires to know node_start_pfn and node_spanned_pages
> > which we currently have but a leter patch will postpone this
> > initialization to the onlining phase which happens later. In fact we do
> > not need to rely on the early pgdat initialization even now because the
> > currently hot added pfn range is currently known.
> > 
> > Split register_one_node into core which does all the common work for
> > the boot time NUMA initialization and the hotplug (__register_one_node).
> > register_one_node keeps the full initialization while hotplug calls
> > __register_one_node and manually calls link_mem_sections for the proper
> > range.
> > 
> > This shouldn't introduce any functional change.
> > 
> > Signed-off-by: Michal Hocko <mhocko@...e.com>
> 
> Acked-by: Vlastimil Babka <vbabka@...e.cz>

Thanks!

> nit:
> > @@ -1387,7 +1387,22 @@ int __ref add_memory_resource(int nid, struct resource *res, bool online)
> >  	node_set_online(nid);
> >  
> >  	if (new_node) {
> > -		ret = register_one_node(nid);
> > +		unsigned long start_pfn = start >> PAGE_SHIFT;
> > +		unsigned long nr_pages = size >> PAGE_SHIFT;
> > +
> > +		ret = __register_one_node(nid);
> > +		if (ret)
> > +			goto register_fail;
> > +
> > +		/*
> > +		 * link memory sections under this node. This is already
> > +		 * done when creatig memory section in register_new_memory
> > +		 * but that depends to have the node registered so offline
> > +		 * nodes have to go through register_node.
> > +		 * TODO clean up this mess.
> 
> Is this a work-in-progress or final TODO? :)

I do not plan to address it in this series, but I will revisit it later.
There are more like this in other patches.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists