Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp605041imm; Fri, 22 Jun 2018 02:03:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJW+xQv19TiEY40vwND0mu74pfgDg5CSW4R39akznbnd2sX6r2pVYcTCRxXxz2g4zbnAJOI X-Received: by 2002:a63:714c:: with SMTP id b12-v6mr646300pgn.420.1529658235873; Fri, 22 Jun 2018 02:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529658235; cv=none; d=google.com; s=arc-20160816; b=Y761Wn9ARN15P1jTJKGl6hhlpWC+0INKiYRSlNhAUAX1JVUVZINf8SvaA6IrpILP7d WJh6EPFkMQ2Um0+JkzK3K1PXoVC8FN8sUpZt6oM/LhQm90n2rVLaMJt8S3t3GmXmn5nU YSSzMCKJzKnaxABimXbvSxEcZbtCxOCcpFVtj7pSv4E8xOhWlJiEtcOLOk6bzeZ0WiV2 1vhNWQ3ZJqrbwBrKdoyQprbz+4zaJWIDsFHwTHVF0DfV+QzKA5TvqzsFeyKjL3Qn/+AL hRg+J6DMUpr3CXM12TaXdV9IyhylahkwCj/8QjtzdjG7A3YDmcW4vsL+tmCzGe5b8WqW BygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=6hmpSIvb0BXDZiuWfM1ipMpN2rK5taD9ksux9Z+o4Qk=; b=R4U1jIC7TdUVVHiWr1oAhzUOkP93X0eu7qHNhSLQVefD6ZHz94XmPjFJwy9ZFWgj98 MpT3QZt6ZJ1dHlEqdyMqTKYdweK6Yax62wcCpefDQpCfBjMYsG9cRZYpnzPPFvyypcGg +wlEdSYgXCDGX6GHAqX9YGdaEj9657ifGw8C7krGdbmN3WNAGbfRP6N2YhgIcfWihh50 dFvfVVfLrLVp/X+WNNlrJB+IuHbe0d7UXE5hwzCro+y3CNMqXjp5DSKB9u9740QrWh9R 4uRD9obNUMp+hL7zafR+3QfINuQwpreoWSQy8MV40IrSR82bUYYjSGiJl77BAT9yEKcU CJFQ== 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 33-v6si7183946plk.299.2018.06.22.02.03.28; Fri, 22 Jun 2018 02:03:55 -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 S1751457AbeFVJBn (ORCPT + 99 others); Fri, 22 Jun 2018 05:01:43 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9117 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751389AbeFVJBk (ORCPT ); Fri, 22 Jun 2018 05:01:40 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9B35ECB26CA05; Fri, 22 Jun 2018 17:01:09 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Fri, 22 Jun 2018 17:00:28 +0800 Subject: Re: [PATCH 1/2] arm64: avoid alloc memory on offline node To: Punit Agrawal , Xie XiuQi CC: Lorenzo Pieralisi , Michal Hocko , 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 References: <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> <874lhz3pmn.fsf@e105922-lin.cambridge.arm.com> <20180619140818.GA16927@e107981-ln.cambridge.arm.com> <87wouu3jz1.fsf@e105922-lin.cambridge.arm.com> <20180619151425.GH13685@dhcp22.suse.cz> <87r2l23i2b.fsf@e105922-lin.cambridge.arm.com> <20180619163256.GA18952@e107981-ln.cambridge.arm.com> <814205eb-ae86-a519-bed0-f09b8e2d3a02@huawei.com> <87602d3ccl.fsf@e105922-lin.cambridge.arm.com> From: Hanjun Guo Message-ID: <5c083c9c-473f-f504-848b-48506d0fd380@huawei.com> Date: Fri, 22 Jun 2018 16:58:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <87602d3ccl.fsf@e105922-lin.cambridge.arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/6/20 19:51, Punit Agrawal wrote: > Xie XiuQi writes: > >> Hi Lorenzo, Punit, >> >> >> On 2018/6/20 0:32, Lorenzo Pieralisi wrote: >>> On Tue, Jun 19, 2018 at 04:35:40PM +0100, Punit Agrawal wrote: >>>> Michal Hocko writes: >>>> >>>>> On Tue 19-06-18 15:54:26, Punit Agrawal wrote: >>>>> [...] >>>>>> In terms of $SUBJECT, I wonder if it's worth taking the original patch >>>>>> as a temporary fix (it'll also be easier to backport) while we work on >>>>>> fixing these other issues and enabling memoryless nodes. >>>>> >>>>> Well, x86 already does that but copying this antipatern is not really >>>>> nice. So it is good as a quick fix but it would be definitely much >>>>> better to have a robust fix. Who knows how many other places might hit >>>>> this. You certainly do not want to add a hack like this all over... >>>> >>>> Completely agree! I was only suggesting it as a temporary measure, >>>> especially as it looked like a proper fix might be invasive. >>>> >>>> Another fix might be to change the node specific allocation to node >>>> agnostic allocations. It isn't clear why the allocation is being >>>> requested from a specific node. I think Lorenzo suggested this in one of >>>> the threads. >>> >>> I think that code was just copypasted but it is better to fix the >>> underlying issue. >>> >>>> I've started putting together a set fixing the issues identified in this >>>> thread. It should give a better idea on the best course of action. >>> >>> On ACPI ARM64, this diff should do if I read the code correctly, it >>> should be (famous last words) just a matter of mapping PXMs to nodes for >>> every SRAT GICC entry, feel free to pick it up if it works. >>> >>> Yes, we can take the original patch just because it is safer for an -rc >>> cycle even though if the patch below would do delaying the fix for a >>> couple of -rc (to get it tested across ACPI ARM64 NUMA platforms) is >>> not a disaster. >> >> I tested this patch on my arm board, it works. > > I am assuming you tried the patch without enabling support for > memory-less nodes. > > The patch de-couples the onlining of numa nodes (as parsed from SRAT) > from NR_CPUS restriction. When it comes to building zonelists, the node > referenced by the PCI controller also has zonelists initialised. > > So it looks like a fallback node is setup even if we don't have > memory-less nodes enabled. I need to stare some more at the code to see > why we need memory-less nodes at all then ... Yes, please. From my limited MM knowledge, zonelists should not be initialised if no CPU and no memory on this node, correct me if I'm wrong. Thanks Hanjun