The patch titled numa: mempolicy: dynamic interleave map for system init has been added to the -mm tree. Its filename is numa-mempolicy-dynamic-interleave-map-for-system-init.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: numa: mempolicy: dynamic interleave map for system init From: Paul Mundt <lethal@xxxxxxxxxxxx> Signed-off-by: Paul Mundt <lethal@xxxxxxxxxxxx> Cc: Andi Kleen <ak@xxxxxxx> Cc: Christoph Lameter <clameter@xxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Cc: Lee Schermerhorn <lee.schermerhorn@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mempolicy.c | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) diff -puN mm/mempolicy.c~numa-mempolicy-dynamic-interleave-map-for-system-init mm/mempolicy.c --- a/mm/mempolicy.c~numa-mempolicy-dynamic-interleave-map-for-system-init +++ a/mm/mempolicy.c @@ -1597,6 +1597,10 @@ void mpol_free_shared_policy(struct shar /* assumes fs == KERNEL_DS */ void __init numa_policy_init(void) { + nodemask_t interleave_nodes; + unsigned long largest = 0; + int nid, prefer = 0; + policy_cache = kmem_cache_create("numa_policy", sizeof(struct mempolicy), 0, SLAB_PANIC, NULL, NULL); @@ -1605,10 +1609,31 @@ void __init numa_policy_init(void) sizeof(struct sp_node), 0, SLAB_PANIC, NULL, NULL); - /* Set interleaving policy for system init. This way not all - the data structures allocated at system boot end up in node zero. */ + /* + * Set interleaving policy for system init. Interleaving is only + * enabled across suitably sized nodes (default is >= 16MB), or + * fall back to the largest node if they're all smaller. + */ + nodes_clear(interleave_nodes); + for_each_online_node(nid) { + unsigned long total_pages = node_present_pages(nid); + + /* Preserve the largest node */ + if (largest < total_pages) { + largest = total_pages; + prefer = nid; + } + + /* Interleave this node? */ + if ((total_pages << PAGE_SHIFT) >= (16 << 20)) + node_set(nid, interleave_nodes); + } + + /* All too small, use the largest */ + if (unlikely(nodes_empty(interleave_nodes))) + node_set(prefer, interleave_nodes); - if (do_set_mempolicy(MPOL_INTERLEAVE, &node_online_map)) + if (do_set_mempolicy(MPOL_INTERLEAVE, &interleave_nodes)) printk("numa_policy_init: interleaving failed\n"); } _ Patches currently in -mm which might be from lethal@xxxxxxxxxxxx are slab-fix-alien-cache-handling.patch potential-parse-error-in-ifdef-part-3.patch lots-of-architectures-enable-arbitary-speed-tty-support.patch git-sh.patch numa-mempolicy-dynamic-interleave-map-for-system-init.patch pvr2fb-fix-pseudo_palette-array-overrun-and-typecast.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