Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752766AbdDDHeT (ORCPT ); Tue, 4 Apr 2017 03:34:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:45425 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751101AbdDDHeR (ORCPT ); Tue, 4 Apr 2017 03:34:17 -0400 Date: Tue, 4 Apr 2017 09:34:12 +0200 From: Michal Hocko To: Reza Arbab , Mel Gorman Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Andrea Arcangeli , Yasuaki Ishimatsu , Tang Chen , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , Zhang Zhen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML , Chris Metcalf , Dan Williams , Heiko Carstens , Lai Jiangshan , Martin Schwidefsky Subject: Re: [PATCH 0/6] mm: make movable onlining suck less Message-ID: <20170404073412.GC15132@dhcp22.suse.cz> References: <20170330115454.32154-1-mhocko@kernel.org> <20170403115545.GK24661@dhcp22.suse.cz> <20170403195830.64libncet5l6vuvb@arbab-laptop> <20170403202337.GA12482@dhcp22.suse.cz> <20170403204213.rs7k2cvsnconel2z@arbab-laptop> <20170404072329.GA15132@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170404072329.GA15132@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1008 Lines: 31 On Tue 04-04-17 09:23:29, Michal Hocko wrote: > [Let's add Gary who as introduced this code c04fc586c1a48] OK, so Gary's email doesn't exist anymore. Does anybody can comment on this? I suspect this code is just-in-case... Mel? > On Mon 03-04-17 15:42:13, Reza Arbab wrote: [...] > > Almost there. I'm seeing the memory in the correct node now, but the > > /sys/devices/system/node/nodeX/memoryY links are not being created. > > > > I think it's tripping up here, in register_mem_sect_under_node(): > > > > page_nid = get_nid_for_pfn(pfn); > > if (page_nid < 0) > > continue; > > Huh, this code is confusing. How can we have a memblock spanning more > nodes? If not then the loop over all sections in the memblock seem > pointless as well. Also why do we require page_initialized() in > get_nid_for_pfn? The changelog doesn't explain that and there are no > comments that would help either. > > Gary, could you clarify this please? > -- > Michal Hocko > SUSE Labs -- Michal Hocko SUSE Labs