]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86_64/mm/numa.c
[PATCH] x86-64: split remaining fake nodes equally
[linux-2.6-omap-h63xx.git] / arch / x86_64 / mm / numa.c
index c55936bc6be64cf9dc8854e34edee4e55ca83d65..0ae2d9d5d7eae9c8ee0069429f5ffb4897887bca 100644 (file)
@@ -418,11 +418,25 @@ static int __init numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
 done:
        if (!num_nodes)
                return -1;
-       /* Fill remainder of system RAM with a final node, if appropriate. */
+       /* Fill remainder of system RAM, if appropriate. */
        if (addr < max_addr) {
-               setup_node_range(num_nodes, nodes, &addr, max_addr - addr,
-                                max_addr);
-               num_nodes++;
+               switch (*(cmdline - 1)) {
+               case '*':
+                       /* Split remaining nodes into coeff chunks */
+                       if (coeff <= 0)
+                               break;
+                       num_nodes += split_nodes_equally(nodes, &addr, max_addr,
+                                                        num_nodes, coeff);
+                       break;
+               case ',':
+                       /* Do not allocate remaining system RAM */
+                       break;
+               default:
+                       /* Give one final node */
+                       setup_node_range(num_nodes, nodes, &addr,
+                                        max_addr - addr, max_addr);
+                       num_nodes++;
+               }
        }
 out:
        memnode_shift = compute_hash_shift(nodes, num_nodes);