linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>,
	Paul Mackerras <paulus@samba.org>,
	PowerPC email list <linuxppc-dev@lists.ozlabs.org>,
	Li Zhong <zhong@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc: Fix warning reported by verify_cpu_node_mapping()
Date: Tue, 26 Aug 2014 08:17:16 -0700	[thread overview]
Message-ID: <20140826151716.GA19690@linux.vnet.ibm.com> (raw)
In-Reply-To: <53FC8736.8080000@linux.vnet.ibm.com>

Hi Nathan,

On 26.08.2014 [08:10:14 -0500], Nathan Fontenot wrote:
> On 08/25/2014 02:22 AM, Li Zhong wrote:
> > With commit 2fabf084b, during boottime, cpu_numa_callback() is called
> > earlier(before their online) for each cpu, and verify_cpu_node_mapping()
> > uses cpu_to_node() to check whether siblings are in the same node. 
> > 
> > It skips the checking for siblings that are not online yet. So the only
> > check done here is for the bootcpu, which is online at that time. But
> > the per-cpu numa_node cpu_to_node() uses hasn't been set up yet (which
> > will be set up in smp_prepare_cpus()).
> > 
> > So I saw something like following reported:
> > [    0.000000] CPU thread siblings 1/2/3 and 0 don't belong to the same
> > node!
> > 
> > As we don't actually do the checking during this early stage, so maybe
> > we could directly call numa_setup_cpu() in do_init_bootmem().
> > 
> > Also, as Nish suggested, here it's better to use present cpu mask
> > instead of possible mask to avoid warning in numa_setup_cpu().
> > 
> > Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
> > ---
> > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> > index d7737a5..3a9061e 100644
> > --- a/arch/powerpc/mm/numa.c
> > +++ b/arch/powerpc/mm/numa.c
> > @@ -1127,9 +1127,8 @@ void __init do_init_bootmem(void)
> >  	 * even before we online them, so that we can use cpu_to_{node,mem}
> >  	 * early in boot, cf. smp_prepare_cpus().
> >  	 */
> > -	for_each_possible_cpu(cpu) {
> > -		cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE,
> > -				  (void *)(unsigned long)cpu);
> > +	for_each_present_cpu(cpu) {
> > +		numa_setup_cpu((unsigned long)cpu);
> >  	}
> >  }
> >  
> 
> I am getting the following error on my system booting with this patch.

With the patch below, you don't get the error, I assume? Does it boot
fully in that case?

-Nish

  reply	other threads:[~2014-08-26 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21  8:14 [RFC PATCH powerpc] Fix warning reported by verify_cpu_node_mapping() Li Zhong
2014-08-21 15:45 ` Nishanth Aravamudan
2014-08-22  2:12   ` Li Zhong
2014-08-22 22:04     ` Nishanth Aravamudan
2014-08-25  6:01       ` Li Zhong
2014-08-25  7:22       ` [PATCH v2] powerpc: " Li Zhong
2014-08-26 13:10         ` Nathan Fontenot
2014-08-26 15:17           ` Nishanth Aravamudan [this message]
2014-08-27  1:41           ` Li Zhong
2014-08-27  9:10             ` Li Zhong

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=20140826151716.GA19690@linux.vnet.ibm.com \
    --to=nacc@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=zhong@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;
as well as URLs for NNTP newsgroup(s).