From patchwork Tue Jun 19 12:52:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Punit Agrawal X-Patchwork-Id: 10474259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 125C16029B for ; Tue, 19 Jun 2018 12:53:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0192A2855C for ; Tue, 19 Jun 2018 12:53:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E95B4285CB; Tue, 19 Jun 2018 12:53:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 603042855C for ; Tue, 19 Jun 2018 12:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To: Date:References:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z385fx6X9xWA2c2IjKaFpPReVtKEl60e+zeG0uuyAi4=; b=j0AzAoP3lQt3lK iyIGwt4MOKChI8ECMRiMMdbvILVtV8GPUWhyvCDA+CUezpNMhxAliGami3WVvi4cowNvi88QWouWY nCpo93SxA2d/p3TwqBFMmy36S0Uy7Q2BqRpGWxIfDETctbn4LvCGRb6dC+HxMIKqHyuceOi0Mscn/ fv0rCkWivbAtdCVk5FviI35U5Fx2m0vA0hO4j36kQmPHt7lK0tgv3xRAaMfaBHqSHP3AXP6D6SUoW QZJH+5r9IQfWhYfO960qL4g7fJZvD2wNribJEP5phY/f4OGYPUhL/SQJsLgVutQGKrbTwaE0FU60l zMXNc8Fwdm1U9w6JjPEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVG8R-0003qo-TK; Tue, 19 Jun 2018 12:53:23 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fVG7a-0003Db-Po for linux-arm-kernel@lists.infradead.org; Tue, 19 Jun 2018 12:52:34 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180619_055230_881983_0A0ABC50 X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm , tnowicki@caviumnetworks.com, Greg Kroah-Hartman , linux-pci@vger.kernel.org, "Rafael J. Wysocki" , Hanjun Guo , Linux Kernel Mailing List , Will Deacon , linux-mm@kvack.org, Bjorn Helgaas , Jarkko Sakkinen , Catalin Marinas , Bjorn Helgaas , Andrew Morton , zhongjiang , wanghuiqiang@huawei.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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);