The patch titled Subject: arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes has been added to the -mm tree. Its filename is powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx> Subject: arch/powerpc/mm/numa.c: do not allocate bootmem memory for non existing nodes With the setup_nr_nodes(), we have already initialized node_possible_map. So it is safe to use for_each_node here. There are many places in the kernel that use hardcoded 'for' loop with nr_node_ids, because all other architectures have numa nodes populated serially. That should be reason we had maintained the same for powerpc. But, since sparse numa node ids possible on powerpc, we unnecessarily allocate memory for non existent numa nodes. For e.g., on a system with 0,1,16,17 as numa nodes nr_node_ids=18 and we allocate memory for nodes 2-14. This patch we allocate memory for only existing numa nodes. The patch is boot tested on a 4 node tuleta, confirming with printks that it works as expected. Signed-off-by: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx> Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Cc: Anton Blanchard <anton@xxxxxxxxx> Cc: Nishanth Aravamudan <nacc@xxxxxxxxxxxxxxxxxx> Cc: Greg Kurz <gkurz@xxxxxxxxxxxxxxxxxx> Cc: Grant Likely <grant.likely@xxxxxxxxxx> Cc: Nikunj A Dadhania <nikunj@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN arch/powerpc/mm/numa.c~powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes arch/powerpc/mm/numa.c --- a/arch/powerpc/mm/numa.c~powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes +++ a/arch/powerpc/mm/numa.c @@ -80,7 +80,7 @@ static void __init setup_node_to_cpumask setup_nr_node_ids(); /* allocate the map */ - for (node = 0; node < nr_node_ids; node++) + for_each_node(node) alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); /* cpumask_of_node() will now work */ _ Patches currently in -mm which might be from raghavendra.kt@xxxxxxxxxxxxxxxxxx are mm-replace-nr_node_ids-for-loop-with-for_each_node-in-list-lru.patch powerpc-numa-do-not-allocate-bootmem-memory-for-non-existing-nodes.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html