From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755099AbcH0I4x (ORCPT ); Sat, 27 Aug 2016 04:56:53 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:57526 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbcH0I4v (ORCPT ); Sat, 27 Aug 2016 04:56:51 -0400 Subject: Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed To: Will Deacon References: <1472024693-12912-1-git-send-email-thunder.leizhen@huawei.com> <1472024693-12912-6-git-send-email-thunder.leizhen@huawei.com> <20160826124746.GB30302@arm.com> CC: Catalin Marinas , linux-arm-kernel , linux-kernel , Rob Herring , "Frank Rowand" , devicetree , Zefan Li , Xinwei Hu , Tianhong Ding , Hanjun Guo From: "Leizhen (ThunderTown)" Message-ID: <57C15560.6020702@huawei.com> Date: Sat, 27 Aug 2016 16:54:56 +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: <20160826124746.GB30302@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.57C1556C.0098,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8fc5085be849ac69b4db374d1431d095 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/8/26 20:47, Will Deacon wrote: > On Wed, Aug 24, 2016 at 03:44:44PM +0800, Zhen Lei wrote: >> numa_init(of_numa_init) may returned error because of numa configuration >> error. So "No NUMA configuration found" is inaccurate. In fact, specific >> configuration error information should be immediately printed by the >> testing branch. >> >> Signed-off-by: Zhen Lei >> --- >> arch/arm64/mm/numa.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c >> index 5bb15ea..d97c6e2 100644 >> --- a/arch/arm64/mm/numa.c >> +++ b/arch/arm64/mm/numa.c >> @@ -335,8 +335,10 @@ static int __init numa_init(int (*init_func)(void)) >> if (ret < 0) >> return ret; >> >> - if (nodes_empty(numa_nodes_parsed)) >> + if (nodes_empty(numa_nodes_parsed)) { >> + pr_info("No NUMA configuration found\n"); >> return -EINVAL; > > Hmm, but dummy_numa_init calls node_set(nid, numa_nodes_parsed) for a > completely artificial setup, created by adding all memblocks to node 0, > so this new message will be suppressed even though things really did go > wrong. It will be printed by the former: numa_init(of_numa_init) > > In that case, don't we want to print *something* (like we do today in > dummy_numa_init) but maybe not "No NUMA configuration found"? What > exactly do you find inaccurate about the current message? For example: [ 0.000000] NUMA: No distance-matrix property in distance-map [ 0.000000] No NUMA configuration found So if of_numa_init or arm64_acpi_numa_init returned error, because of some numa configuration error had been found, it's no good to print "No NUMA ...". > > Will > > . > From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Leizhen (ThunderTown)" Subject: Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed Date: Sat, 27 Aug 2016 16:54:56 +0800 Message-ID: <57C15560.6020702@huawei.com> References: <1472024693-12912-1-git-send-email-thunder.leizhen@huawei.com> <1472024693-12912-6-git-send-email-thunder.leizhen@huawei.com> <20160826124746.GB30302@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160826124746.GB30302-5wv7dgnIgG8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Will Deacon Cc: Catalin Marinas , linux-arm-kernel , linux-kernel , Rob Herring , Frank Rowand , devicetree , Zefan Li , Xinwei Hu , Tianhong Ding , Hanjun Guo List-Id: devicetree@vger.kernel.org On 2016/8/26 20:47, Will Deacon wrote: > On Wed, Aug 24, 2016 at 03:44:44PM +0800, Zhen Lei wrote: >> numa_init(of_numa_init) may returned error because of numa configuration >> error. So "No NUMA configuration found" is inaccurate. In fact, specific >> configuration error information should be immediately printed by the >> testing branch. >> >> Signed-off-by: Zhen Lei >> --- >> arch/arm64/mm/numa.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c >> index 5bb15ea..d97c6e2 100644 >> --- a/arch/arm64/mm/numa.c >> +++ b/arch/arm64/mm/numa.c >> @@ -335,8 +335,10 @@ static int __init numa_init(int (*init_func)(void)) >> if (ret < 0) >> return ret; >> >> - if (nodes_empty(numa_nodes_parsed)) >> + if (nodes_empty(numa_nodes_parsed)) { >> + pr_info("No NUMA configuration found\n"); >> return -EINVAL; > > Hmm, but dummy_numa_init calls node_set(nid, numa_nodes_parsed) for a > completely artificial setup, created by adding all memblocks to node 0, > so this new message will be suppressed even though things really did go > wrong. It will be printed by the former: numa_init(of_numa_init) > > In that case, don't we want to print *something* (like we do today in > dummy_numa_init) but maybe not "No NUMA configuration found"? What > exactly do you find inaccurate about the current message? For example: [ 0.000000] NUMA: No distance-matrix property in distance-map [ 0.000000] No NUMA configuration found So if of_numa_init or arm64_acpi_numa_init returned error, because of some numa configuration error had been found, it's no good to print "No NUMA ...". > > Will > > . > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: thunder.leizhen@huawei.com (Leizhen (ThunderTown)) Date: Sat, 27 Aug 2016 16:54:56 +0800 Subject: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed In-Reply-To: <20160826124746.GB30302@arm.com> References: <1472024693-12912-1-git-send-email-thunder.leizhen@huawei.com> <1472024693-12912-6-git-send-email-thunder.leizhen@huawei.com> <20160826124746.GB30302@arm.com> Message-ID: <57C15560.6020702@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 2016/8/26 20:47, Will Deacon wrote: > On Wed, Aug 24, 2016 at 03:44:44PM +0800, Zhen Lei wrote: >> numa_init(of_numa_init) may returned error because of numa configuration >> error. So "No NUMA configuration found" is inaccurate. In fact, specific >> configuration error information should be immediately printed by the >> testing branch. >> >> Signed-off-by: Zhen Lei >> --- >> arch/arm64/mm/numa.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c >> index 5bb15ea..d97c6e2 100644 >> --- a/arch/arm64/mm/numa.c >> +++ b/arch/arm64/mm/numa.c >> @@ -335,8 +335,10 @@ static int __init numa_init(int (*init_func)(void)) >> if (ret < 0) >> return ret; >> >> - if (nodes_empty(numa_nodes_parsed)) >> + if (nodes_empty(numa_nodes_parsed)) { >> + pr_info("No NUMA configuration found\n"); >> return -EINVAL; > > Hmm, but dummy_numa_init calls node_set(nid, numa_nodes_parsed) for a > completely artificial setup, created by adding all memblocks to node 0, > so this new message will be suppressed even though things really did go > wrong. It will be printed by the former: numa_init(of_numa_init) > > In that case, don't we want to print *something* (like we do today in > dummy_numa_init) but maybe not "No NUMA configuration found"? What > exactly do you find inaccurate about the current message? For example: [ 0.000000] NUMA: No distance-matrix property in distance-map [ 0.000000] No NUMA configuration found So if of_numa_init or arm64_acpi_numa_init returned error, because of some numa configuration error had been found, it's no good to print "No NUMA ...". > > Will > > . >