Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470687 > unrolled thread

Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed

Started byWill Deacon <will.deacon@arm.com>
First post2016-08-26 14:50 +0200
Last post2016-08-31 04:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to  be printed Will Deacon <will.deacon@arm.com> - 2016-08-26 14:50 +0200
    Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be  printed "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-08-27 11:00 +0200
      Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to  be printed Will Deacon <will.deacon@arm.com> - 2016-08-30 20:00 +0200
        Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be  printed "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-08-31 04:40 +0200

#1470687 — Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed

FromWill Deacon <will.deacon@arm.com>
Date2016-08-26 14:50 +0200
SubjectRe: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed
Message-ID<saoK6-6YC-15@gated-at.bofh.it>
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 <thunder.leizhen@huawei.com>
> ---
>  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.

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?

Will

[toc] | [next] | [standalone]


#1471137 — Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed

From"Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
Date2016-08-27 11:00 +0200
SubjectRe: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed
Message-ID<saHD3-2mf-21@gated-at.bofh.it>
In reply to#1470687

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 <thunder.leizhen@huawei.com>
>> ---
>>  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
> 
> .
> 

[toc] | [prev] | [next] | [standalone]


#1472739

FromWill Deacon <will.deacon@arm.com>
Date2016-08-30 20:00 +0200
Message-ID<sbVui-80h-33@gated-at.bofh.it>
In reply to#1471137
On Sat, Aug 27, 2016 at 04:54:56PM +0800, Leizhen (ThunderTown) wrote:
> 
> 
> 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 <thunder.leizhen@huawei.com>
> >> ---
> >>  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)

Does that print an error for every possible failure case? What about the
acpi path?

> > 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 ...".

Sure, I'm all for changing the message. I just think removing it is
probably unhelpful. Something like:

"NUMA: Failed to initialise from firmware"

might do the trick?

Will

[toc] | [prev] | [next] | [standalone]


#1472988 — Re: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed

From"Leizhen (ThunderTown)" <thunder.leizhen@huawei.com>
Date2016-08-31 04:40 +0200
SubjectRe: [PATCH v7 05/14] arm64/numa: avoid inconsistent information to be printed
Message-ID<sc3Bw-4VN-11@gated-at.bofh.it>
In reply to#1472739

On 2016/8/31 1:51, Will Deacon wrote:
> On Sat, Aug 27, 2016 at 04:54:56PM +0800, Leizhen (ThunderTown) wrote:
>>
>>
>> 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 <thunder.leizhen@huawei.com>
>>>> ---
>>>>  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)
> 
> Does that print an error for every possible failure case? What about the
> acpi path?
I think acpi path should print error by itself. The reason maybe:
1. In numa_init and its sub function, all error paths printed error immediately, except arm64_acpi_numa_init.
2. Suppose numa_init returns error, we do not print the returned error code, so the user don't known what problem cause acpi numa failed.


> 
>>> 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 ...".
> 
> Sure, I'm all for changing the message. I just think removing it is
> probably unhelpful. Something like:
> 
> "NUMA: Failed to initialise from firmware"
I think adding this into arm64_acpi_numa_init will be better, maybe we should print 'ret' further:

int __init arm64_acpi_numa_init(void)
{
	int ret;

	ret = acpi_numa_init();
	if (ret) {
+		pr_info("Failed to initialise from firmware\n");
		return ret;
	}

> 
> might do the trick?
> 
> Will
> 
> .
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web