On Thu, 5 Mar 2015, Nishanth Aravamudan wrote: > So if we compare to x86: > > arch/x86/mm/numa.c::numa_init(): > > nodes_clear(numa_nodes_parsed); > nodes_clear(node_possible_map); > nodes_clear(node_online_map); > ... > numa_register_memblks(...); > > arch/x86/mm/numa.c::numa_register_memblks(): > > node_possible_map = numa_nodes_parsed; > > Basically, it looks like x86 NUMA init clears out possible map and > online map, probably for a similar reason to what I gave in the > changelog that by default, the possible map seems to be based off > MAX_NUMNODES, rather than nr_node_ids or anything dynamic. > > My patch was an attempt to emulate the same thing on powerpc. You are > right that there is a window in which the node_possible_map and > node_online_map are out of sync with my patch. It seems like it > shouldn't matter given how early in boot we are, but perhaps the > following would have been clearer: > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 0257a7d659ef..1a118b08fad2 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -958,6 +958,13 @@ void __init initmem_init(void) > > memblock_dump_all(); > > + /* > + * Reduce the possible NUMA nodes to the online NUMA nodes, > + * since we do not support node hotplug. This ensures that we > + * lower the maximum NUMA node ID to what is actually present. > + */ > + nodes_and(node_possible_map, node_possible_map, node_online_map);
If you don't support node hotplug, then a node should always be possible if it's online unless there are other tricks powerpc plays with node_possible_map. Shouldn't this just be node_possible_map = node_online_map? > + > for_each_online_node(nid) { > unsigned long start_pfn, end_pfn; > > > _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev