From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753005AbcHRRVw (ORCPT ); Thu, 18 Aug 2016 13:21:52 -0400 Received: from foss.arm.com ([217.140.101.70]:59838 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbcHRRVt (ORCPT ); Thu, 18 Aug 2016 13:21:49 -0400 Date: Thu, 18 Aug 2016 17:04:37 +0100 From: Catalin Marinas To: zhongjiang Cc: mark.rutland@arm.com, robh+dt@kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ganapatrao Kulkarni Subject: Re: [PATCH] mm, numa: boot cpu should bound to the node0 when node_off enable Message-ID: <20160818160437.GA21343@e104818-lin.cambridge.arm.com> References: <1471525766-12803-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471525766-12803-1-git-send-email-zhongjiang@huawei.com> 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 On Thu, Aug 18, 2016 at 09:09:26PM +0800, zhongjiang wrote: > At present, boot cpu will bound to a node from device tree when node_off enable. > if the node is not initialization, it will lead to a following problem. > > next_zones_zonelist+0x18/0x80 > __build_all_zonelists+0x1e0/0x288 > build_all_zonelists_init+0x10/0x1c > build_all_zonelists+0x114/0x128 > start_kernel+0x1a0/0x414 I think this "problem" is missing a lot of information. Is this supposed to be a kernel panic? > The patch fix it by fallback to node 0. therefore, the cpu will bound to the node > correctly. > > Signed-off-by: zhongjiang > --- > arch/arm64/mm/numa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > index 4dcd7d6..1f8f5da 100644 > --- a/arch/arm64/mm/numa.c > +++ b/arch/arm64/mm/numa.c > @@ -119,7 +119,7 @@ void numa_store_cpu_info(unsigned int cpu) > void __init early_map_cpu_to_node(unsigned int cpu, int nid) > { > /* fallback to node 0 */ > - if (nid < 0 || nid >= MAX_NUMNODES) > + if (nid < 0 || nid >= MAX_NUMNODES || numa_off) > nid = 0; > > cpu_to_node_map[cpu] = nid; The patch looks fine (slight inconsistence from the map_cpu_to_node() callers but I guess we don't want to expose numa_off outside this file). I would however like to see an Ack from Ganapat (cc'ed). -- Catalin