Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936846Ab3DHK4Y (ORCPT ); Mon, 8 Apr 2013 06:56:24 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:48168 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935424Ab3DHK4T (ORCPT ); Mon, 8 Apr 2013 06:56:19 -0400 Date: Mon, 8 Apr 2013 11:55:57 +0100 From: Will Deacon To: Lin Feng Cc: "akpm@linux-foundation.org" , "cl@linux.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "yinghai@kernel.org" , Catalin Marinas , "arnd@arndb.de" , "tony@atomide.com" , "ben@decadent.org.uk" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "linux-mm@kvack.org" , "isimatu.yasuaki@jp.fujitsu.com" Subject: Re: [PATCH 2/2] mm: vmemmap: arm64: add vmemmap_verify check for hot-add node case Message-ID: <20130408105556.GB17476@mudshark.cambridge.arm.com> References: <1365415000-10389-1-git-send-email-linfeng@cn.fujitsu.com> <1365415000-10389-3-git-send-email-linfeng@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1365415000-10389-3-git-send-email-linfeng@cn.fujitsu.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1985 Lines: 52 Hello, On Mon, Apr 08, 2013 at 10:56:40AM +0100, Lin Feng wrote: > In hot add node(memory) case, vmemmap pages are always allocated from other > node, but the current logic just skip vmemmap_verify check. > So we should also issue "potential offnode page_structs" warning messages > if we are the case. > > Cc: Christoph Lameter > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Arnd Bergmann > Cc: Tony Lindgren > Cc: Ben Hutchings > Cc: Andrew Morton > Reported-by: Yasuaki Ishimatsu > Signed-off-by: Lin Feng > --- > arch/arm64/mm/mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index 70b8cd4..9f1e417 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -427,8 +427,8 @@ int __meminit vmemmap_populate(struct page *start_page, > return -ENOMEM; > > set_pmd(pmd, __pmd(__pa(p) | prot_sect_kernel)); > - } else > - vmemmap_verify((pte_t *)pmd, node, addr, next); > + } > + vmemmap_verify((pte_t *)pmd, node, addr, next); > } while (addr = next, addr != end); > > return 0; Given that we don't have NUMA support or memory-hotplug on arm64 yet, I'm not sure that this change makes much sense at the moment. early_pfn_to_nid will always return 0 and we only ever have one node. To be honest, I'm not sure what that vmemmap_verify check is trying to achieve anyway. ia64 does some funky node affinity initialisation early on but, for the rest of us, it looks like we always just check the distance from node 0. Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/