From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933502AbcJ0D4A (ORCPT ); Wed, 26 Oct 2016 23:56:00 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:28283 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753446AbcJ0Dz7 (ORCPT ); Wed, 26 Oct 2016 23:55:59 -0400 Subject: Re: [PATCH 2/2] arm64/numa: support HAVE_MEMORYLESS_NODES To: Will Deacon References: <1477364358-10620-1-git-send-email-thunder.leizhen@huawei.com> <1477364358-10620-3-git-send-email-thunder.leizhen@huawei.com> <20161026183614.GJ15216@arm.com> CC: Catalin Marinas , linux-arm-kernel , linux-kernel , Andrew Morton , linux-mm , Zefan Li , Xinwei Hu , Hanjun Guo From: "Leizhen (ThunderTown)" Message-ID: <58117A7B.1040004@huawei.com> Date: Thu, 27 Oct 2016 11:54:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20161026183614.GJ15216@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/10/27 2:36, Will Deacon wrote: > On Tue, Oct 25, 2016 at 10:59:18AM +0800, Zhen Lei wrote: >> Some numa nodes may have no memory. For example: >> 1) a node has no memory bank plugged. >> 2) a node has no memory bank slots. >> >> To ensure percpu variable areas and numa control blocks of the >> memoryless numa nodes to be allocated from the nearest available node to >> improve performance, defined node_distance_ready. And make its value to be >> true immediately after node distances have been initialized. >> >> Signed-off-by: Zhen Lei >> --- >> arch/arm64/Kconfig | 4 ++++ >> arch/arm64/include/asm/numa.h | 3 +++ >> arch/arm64/mm/numa.c | 6 +++++- >> 3 files changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index 30398db..648dd13 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -609,6 +609,10 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK >> def_bool y >> depends on NUMA >> >> +config HAVE_MEMORYLESS_NODES >> + def_bool y >> + depends on NUMA > > Given that patch 1 and the associated node_distance_ready stuff is all > an unqualified performance optimisation, is there any merit in just > enabling HAVE_MEMORYLESS_NODES in Kconfig and then optimising things as > a separate series when you have numbers to back it up? HAVE_MEMORYLESS_NODES is also an performance optimisation for memoryless scenario. For example: node0 is a memoryless node, node1 is the nearest node of node0. We want to allocate memory from node0, normally memory manager will try node0 first, then node1. But we have already kwown that node0 have no memory, so we can tell memory manager directly try node1 first. So HAVE_MEMORYLESS_NODES is used to skip the memoryless nodes, don't try them. So I think the title of this patch is misleading, I will rewrite it in V2. Or, Do you mean separate it into a new patch? > > Will > > . >