Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5142975imm; Tue, 19 Jun 2018 05:53:17 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKCneXQn65RlnBTkqKvCoCWgyA+ZUaraSuvvqywfSU6IplcvQmeKazmYrBkhgbYCRlYvVux X-Received: by 2002:a17:902:6b47:: with SMTP id g7-v6mr18999342plt.251.1529412797916; Tue, 19 Jun 2018 05:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529412797; cv=none; d=google.com; s=arc-20160816; b=OLHA/ANs6La2e3TJgeWB/imJpsabLK/m6tTKAXGdvmhFCKPbrzX3C3//kbw3NU4eTk 4XTkIBHv9JDhK6/aCmAfA5qlzvaw2vqF7RQL9/urQV9yeTPCtm1VEY9G70xUvAthgPDy Rl5Qjh+J/XLhJBqAYEt6NT4bMOvFEuacPirweMbG7upIfM8ZarXBFh16QCkrjqtEESvD dYzz9tRzCU4YAT5Y2H9M04e48LZ4iCMDC1/y5N/9egf39dslEjsXhlA45X65gLwTO61D GS3liCk8tqsUYZS0x3CqEIPqbZplxSbAxYpiw/YSygXry0XyxN/f2DFWk4GPWtNH7jL7 u/BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=dw8Sy3LhwWwTeegcTfA73+DkoyAG3nGVDkx500fx0+E=; b=r8BIc9zsKu/4jH34aDrd6+TX2Ck/wls8oA5IKU9O9vJRVW1+7NkNJf0Rb3m9yEv/pO hCzb/La7lMW3aektU2Axc9KysZSFUpGE3+d6EVabI6LF1nIaW37eMk7Y4ka4pjrAdgQo Vtm/CygQNg3P2vQMTxxW8FXbNlV6V5ei69VdUrH2Dp76IekiaZlifNt+Bvh0u05RIkbp gUZooQDVlVWUX2QE+9MAUu+UdY0HtEhrxnUAv8UGDsNR1AvkZwbSTlJK7GsjLKT1JIfM AvLO9HkwGocZTnoaigj/OT1dosPPeA1t7kgh70JjrK6Q+A6vhkQFCD/97MP1BN7zZZ8G Wo8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w11-v6si10698012pge.422.2018.06.19.05.53.02; Tue, 19 Jun 2018 05:53:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937804AbeFSMwU (ORCPT + 99 others); Tue, 19 Jun 2018 08:52:20 -0400 Received: from foss.arm.com ([217.140.101.70]:49250 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937580AbeFSMwS (ORCPT ); Tue, 19 Jun 2018 08:52:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7A60E80D; Tue, 19 Jun 2018 05:52:18 -0700 (PDT) Received: from localhost (e105922-lin.cambridge.arm.com [10.1.206.33]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E6CF3F557; Tue, 19 Jun 2018 05:52:17 -0700 (PDT) From: Punit Agrawal To: Michal Hocko , Xie XiuQi Cc: Hanjun Guo , Bjorn Helgaas , , , Catalin Marinas , "Rafael J. Wysocki" , Will Deacon , Linux Kernel Mailing List , Jarkko Sakkinen , , , Greg Kroah-Hartman , Bjorn Helgaas , Andrew Morton , zhongjiang , linux-arm Subject: Re: [PATCH 1/2] arm64: avoid alloc memory on offline node References: <5ed798a0-6c9c-086e-e5e8-906f593ca33e@huawei.com> <20180607122152.GP32433@dhcp22.suse.cz> <20180611085237.GI13364@dhcp22.suse.cz> <16c4db2f-bc70-d0f2-fb38-341d9117ff66@huawei.com> <20180611134303.GC75679@bhelgaas-glaptop.roam.corp.google.com> <20180611145330.GO13364@dhcp22.suse.cz> <87lgbk59gs.fsf@e105922-lin.cambridge.arm.com> <87bmce60y3.fsf@e105922-lin.cambridge.arm.com> <8b715082-14d4-f10b-d2d6-b23be7e4bf7e@huawei.com> <20180619120714.GE13685@dhcp22.suse.cz> Date: Tue, 19 Jun 2018 13:52:16 +0100 In-Reply-To: <20180619120714.GE13685@dhcp22.suse.cz> (Michal Hocko's message of "Tue, 19 Jun 2018 14:07:14 +0200") Message-ID: <874lhz3pmn.fsf@e105922-lin.cambridge.arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko writes: > On Tue 19-06-18 20:03:07, Xie XiuQi wrote: > [...] >> I tested on a arm board with 128 cores 4 numa nodes, but I set CONFIG_NR_CPUS=72. >> Then node 3 is not be created, because node 3 has no memory, and no cpu. >> But some pci device may related to node 3, which be set in ACPI table. > > Could you double check that zonelists for node 3 are generated > correctly? The cpus in node 3 aren't onlined and there's no memory attached - I suspect that no zonelists are built for this node. We skip creating a node, if the number of SRAT entries parsed exceeds NR_CPUS[0]. This in turn prevents onlining the numa node and so no zonelists will be created for it. I think the problem will go away if the cpus are restricted via the kernel command line by setting nr_cpus. Xie, can you try the below patch on top of the one enabling memoryless nodes? I'm not sure this is the right solution but at least it'll confirm the problem. Thanks, Punit [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/kernel/acpi_numa.c?h=v4.18-rc1#n73 -- >8 -- diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c index d190a7b231bf..fea0f7164f1a 100644 --- a/arch/arm64/kernel/acpi_numa.c +++ b/arch/arm64/kernel/acpi_numa.c @@ -70,11 +70,9 @@ void __init acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) if (!(pa->flags & ACPI_SRAT_GICC_ENABLED)) return; - if (cpus_in_srat >= NR_CPUS) { + if (cpus_in_srat >= NR_CPUS) pr_warn_once("SRAT: cpu_to_node_map[%d] is too small, may not be able to use all cpus\n", NR_CPUS); - return; - } pxm = pa->proximity_domain; node = acpi_map_pxm_to_node(pxm);