LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Vipin K Parashar <vipin@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Cc: nfont@linux.vnet.ibm.com, Vipin K Parashar <vipin@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc/numa: Correct kernel message severity
Date: Fri, 22 Jun 2018 11:32:59 +1000	[thread overview]
Message-ID: <87y3f7ehbo.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1521013954-21348-1-git-send-email-vipin@linux.vnet.ibm.com>

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

      parent reply	other threads:[~2018-06-22  1:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3f7ehbo.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=vipin@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox