All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/numa: Correct kernel message severity
@ 2018-03-14  7:52 Vipin K Parashar
  2018-03-14  7:58 ` Christophe LEROY
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vipin K Parashar @ 2018-03-14  7:52 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: nfont, Vipin K Parashar

printk() in unmap_cpu_from_node() uses KERN_ERR message severity,
for a WARNING message. Change it to pr_warn().

Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index edd8d0b..1632f4b 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -163,8 +163,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
 	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
 		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
 	} else {
-		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
-		       cpu, node);
+		pr_warn("WARNING: cpu %lu not found in node %d\n", cpu, node);
 	}
 }
 #endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] powerpc/numa: Correct kernel message severity
  2018-03-14  7:52 [PATCH v2] powerpc/numa: Correct kernel message severity Vipin K Parashar
@ 2018-03-14  7:58 ` Christophe LEROY
  2018-05-30  6:43 ` Vipin K Parashar
  2018-06-22  1:32 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Christophe LEROY @ 2018-03-14  7:58 UTC (permalink / raw)
  To: Vipin K Parashar, linuxppc-dev; +Cc: nfont



Le 14/03/2018 à 08:52, Vipin K Parashar a écrit :
> printk() in unmap_cpu_from_node() uses KERN_ERR message severity,
> for a WARNING message. Change it to pr_warn().
> 
> Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>

Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>

> ---
>   arch/powerpc/mm/numa.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index edd8d0b..1632f4b 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -163,8 +163,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
>   	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
>   		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
>   	} else {
> -		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
> -		       cpu, node);
> +		pr_warn("WARNING: cpu %lu not found in node %d\n", cpu, node);
>   	}
>   }
>   #endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] powerpc/numa: Correct kernel message severity
  2018-03-14  7:52 [PATCH v2] powerpc/numa: Correct kernel message severity Vipin K Parashar
  2018-03-14  7:58 ` Christophe LEROY
@ 2018-05-30  6:43 ` Vipin K Parashar
  2018-06-22  1:32 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Vipin K Parashar @ 2018-05-30  6:43 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: nfont, Christophe LEROY, Michael Ellerman

Hi,


Any progress/update with this patch ?

Please do let know, if something more is needed here.


Regards,

Vipin


On Wednesday 14 March 2018 01:22 PM, Vipin K Parashar wrote:
> printk() in unmap_cpu_from_node() uses KERN_ERR message severity,
> for a WARNING message. Change it to pr_warn().
>
> Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
> ---
>   arch/powerpc/mm/numa.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index edd8d0b..1632f4b 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -163,8 +163,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
>   	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
>   		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
>   	} else {
> -		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
> -		       cpu, node);
> +		pr_warn("WARNING: cpu %lu not found in node %d\n", cpu, node);
>   	}
>   }
>   #endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] powerpc/numa: Correct kernel message severity
  2018-03-14  7:52 [PATCH v2] powerpc/numa: Correct kernel message severity Vipin K Parashar
  2018-03-14  7:58 ` Christophe LEROY
  2018-05-30  6:43 ` Vipin K Parashar
@ 2018-06-22  1:32 ` Michael Ellerman
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2018-06-22  1:32 UTC (permalink / raw)
  To: Vipin K Parashar, linuxppc-dev; +Cc: nfont, Vipin K Parashar

Vipin K Parashar <vipin@linux.vnet.ibm.com> writes:

> printk() in unmap_cpu_from_node() uses KERN_ERR message severity,
> for a WARNING message. Change it to pr_warn().
>
> Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/numa.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index edd8d0b..1632f4b 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -163,8 +163,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
>  	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
>  		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
>  	} else {
> -		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
> -		       cpu, node);
> +		pr_warn("WARNING: cpu %lu not found in node %d\n", cpu, node);
>  	}
>  }

The full function is:

static void unmap_cpu_from_node(unsigned long cpu)
{
	int node = numa_cpu_lookup_table[cpu];

	dbg("removing cpu %lu from node %d\n", cpu, node);

	if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
		cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
	} else {
		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
		       cpu, node);
	}
}


So we look up what node the CPU is on, and then we lookup the set of
CPUs on that node, and they don't match.

That seems like a bug, not a warning.

Have you looked at why we're seeing this warning? It seems like maybe
something else is going wrong to get us into this situation to begin
with.

If there's some good reason why this is happening, and it's truly
harmless, then we can just remove the printk() entirely.

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-22  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14  7:52 [PATCH v2] powerpc/numa: Correct kernel message severity Vipin K Parashar
2018-03-14  7:58 ` Christophe LEROY
2018-05-30  6:43 ` Vipin K Parashar
2018-06-22  1:32 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.