All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	David Rientjes <rientjes@google.com>, Tejun Heo <tj@kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map
Date: Thu, 5 Mar 2015 15:17:37 -0800	[thread overview]
Message-ID: <20150305231737.GC30570@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425592132.13327.0.camel@ellerman.id.au>

On 06.03.2015 [08:48:52 +1100], Michael Ellerman wrote:
> On Thu, 2015-03-05 at 13:16 -0800, David Rientjes wrote:
> > On Thu, 5 Mar 2015, Nishanth Aravamudan wrote:
> > 
> > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> > > index 0257a7d659ef..24de29b3651b 100644
> > > --- a/arch/powerpc/mm/numa.c
> > > +++ b/arch/powerpc/mm/numa.c
> > > @@ -958,9 +958,17 @@ void __init initmem_init(void)
> > >  
> > >  	memblock_dump_all();
> > >  
> > > +	/*
> > > +	 * zero out the possible nodes after we parse the device-tree,
> > > +	 * so that we lower the maximum NUMA node ID to what is actually
> > > +	 * present.
> > > +	 */
> > > +	nodes_clear(node_possible_map);
> > > +
> > >  	for_each_online_node(nid) {
> > >  		unsigned long start_pfn, end_pfn;
> > >  
> > > +		node_set(nid, node_possible_map);
> > >  		get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
> > >  		setup_node_data(nid, start_pfn, end_pfn);
> > >  		sparse_memory_present_with_active_regions(nid);
> > 
> > This seems a bit strange, node_possible_map is supposed to be a superset 
> > of node_online_map and this loop is iterating over node_online_map to set 
> > nodes in node_possible_map.
>  
> Yeah. Though at this point in boot I don't think it matters that the two maps
> are out-of-sync temporarily.
> 
> But it would simpler to just set the possible map to be the online
> map. That would also maintain the invariant that the possible map is
> always a superset of the online map.

Yes, we could do that (see my reply to David just now). I didn't
consider just setting the map directly, that would be clearer. I didn't
want to post my nodes_and() version, because the cost of nodes_and
seemed higher than nodes_clear & node_set appropriately.

-Nish

  parent reply	other threads:[~2015-03-05 23:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 18:05 [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map Nishanth Aravamudan
2015-03-05 21:16 ` David Rientjes
2015-03-05 21:48   ` Michael Ellerman
2015-03-05 21:58     ` David Rientjes
2015-03-05 22:08       ` Tejun Heo
2015-03-05 22:18         ` Tejun Heo
2015-03-05 23:21         ` Nishanth Aravamudan
2015-03-05 23:24           ` Tejun Heo
2015-03-05 23:20       ` Nishanth Aravamudan
2015-03-05 23:17     ` Nishanth Aravamudan [this message]
2015-03-05 23:15   ` Nishanth Aravamudan
2015-03-05 23:29     ` David Rientjes
2015-03-06  5:27       ` [PATCH v2] powerpc/numa: set node_possible_map to only node_online_map during boot Nishanth Aravamudan
2015-03-06 11:29         ` Raghavendra K T
2015-03-09 23:55         ` Michael Ellerman
2015-03-10 23:50           ` [PATCH v3] " Nishanth Aravamudan
2015-03-05 22:13 ` [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map Tejun Heo
2015-03-05 23:27   ` Nishanth Aravamudan

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=20150305231737.GC30570@linux.vnet.ibm.com \
    --to=nacc@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=raghavendra.kt@linux.vnet.ibm.com \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    /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 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.