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: 10474245 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 B5401603B5 for ; Tue, 19 Jun 2018 12:52:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2CDA28B49 for ; Tue, 19 Jun 2018 12:52:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9774C28B93; Tue, 19 Jun 2018 12:52:21 +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, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AF5428B97 for ; Tue, 19 Jun 2018 12:52:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 57D456B0003; Tue, 19 Jun 2018 08:52:20 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 52BC46B0005; Tue, 19 Jun 2018 08:52:20 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 443B26B0007; Tue, 19 Jun 2018 08:52:20 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot0-f197.google.com (mail-ot0-f197.google.com [74.125.82.197]) by kanga.kvack.org (Postfix) with ESMTP id 1A85C6B0003 for ; Tue, 19 Jun 2018 08:52:20 -0400 (EDT) Received: by mail-ot0-f197.google.com with SMTP id h3-v6so11826473otj.15 for ; Tue, 19 Jun 2018 05:52:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=dw8Sy3LhwWwTeegcTfA73+DkoyAG3nGVDkx500fx0+E=; b=lhJOUQphDjIXRN/F8YYHypLCg3bYDnJPaIT01Nji+q0HJY2F362H/FfdBq83zWeL1V Gm1tkHgqCF7dBUf/7rSNHCQEfo0KdlTMXV7FrcbgPUEl1duQ/OhVdO16EEFisNNWSsns YJEDOpiMzCtbAD/jKCeU0LPFCpoyuDCrVivYEax8d06FJ2LQjSY3DFYdchPpbrj0QLL4 gh5mhoZyF0P04DrXNJOvjQJE7Ij2ZsaN9whMMAbiEqe7L+x8lFVdTbDgLwQW3A1JXhZ9 U5tk/QWxaP7k8uj606FiYGm/NzI5mE32I4vPoZJTHLph9+4CaTI9t0S8AkFdnk1KGiLA dd1g== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of punit.agrawal@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=punit.agrawal@arm.com X-Gm-Message-State: APt69E2K4tEaxyFy0h3DufCQ8jkfk3wMBQCJy1UONc9O2euAZhY5pOW6 cRwAhb2SJE7nkwtbKmt4dIh/20nzMilOxZy+FDz4IEWdT8zLDc4cXU/S24asvaswM4azZxhJOCI jUJ+d1bXW1ERebAKs5wN3S5Rc5JuZUesuLqcPixoBC5/vk/Vq44465r0bkapQ92WuWg== X-Received: by 2002:a9d:fba:: with SMTP id d55-v6mr10749312otd.53.1529412739845; Tue, 19 Jun 2018 05:52:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKcEOz3H/YSMt+LQEN4y6lrKtqOweoxMd3FMurB68jwZk8qu+ZQMTYIoN7ZXFX78NXfpZs7 X-Received: by 2002:a9d:fba:: with SMTP id d55-v6mr10749287otd.53.1529412739063; Tue, 19 Jun 2018 05:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529412739; cv=none; d=google.com; s=arc-20160816; b=CMkvaaKFzuZSL+ztiJ2T1/1IppIfaAKi7hRrHriGu8RQG7i9xtNBP61zkWbjvva7Q/ jd4ua2PJA6/BtlxpbvWmrHLqxdmv5WmzsViNBGUgAfEEFZ7gy8GDzeblVLyOvY2NPVQP UnwwxyJFBN8CsqXSTeMVqjQJs7/QWM++cvRvLZ0tQlg8AKg+ChQMmhPlHZuRq8q3BFT2 Oq5gQdHlDLOQeSeTUO+TpXBue6nz3fXKcVXiJLkGYBgonxPFimOkGDfoHZ68sqb/cM3R LOrb8DNh8LB10FQmez75hS4NOnfAwrkeW2pu1+ZH8eqhAtBa9WIjbqi5+vnuN4onTlVc 5psg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:arc-authentication-results; bh=dw8Sy3LhwWwTeegcTfA73+DkoyAG3nGVDkx500fx0+E=; b=PTNUvKsjnuxxejv7vdL3gAbfzDuzktz4u41zALsADxH2bibAREABBOAH+XInYajwsQ xGhoP5mB7fjS3Zl1rDEiV80+c3/0rQAIizFAhG+TKgG4GBNfIMz2No9ouo/meMbgSDmc vj9KBEud33c06bZD9WdhqLIQp6+htSOAa1buOq9ZlA9rguJR+M613zB9FVj9y0Y6R75+ GBAxMHaDZaXqNVBNvZ49ihZBtM7x7L2EFOPx8ybTc6UO++EfY7yMZ5KWeEq2Uc+s+Fql Xzb7UYQTfvv0cH/ovo30HJ3njgEqdj5FpYCIR6xfYrEC0L0CcJsdv3zMGQmscjOo3QxS E3iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of punit.agrawal@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=punit.agrawal@arm.com Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com. [217.140.101.70]) by mx.google.com with ESMTP id b65-v6si5591377oif.390.2018.06.19.05.52.18 for ; Tue, 19 Jun 2018 05:52:18 -0700 (PDT) Received-SPF: pass (google.com: domain of punit.agrawal@arm.com designates 217.140.101.70 as permitted sender) client-ip=217.140.101.70; Authentication-Results: mx.google.com; spf=pass (google.com: domain of punit.agrawal@arm.com designates 217.140.101.70 as permitted sender) smtp.mailfrom=punit.agrawal@arm.com 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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);