aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2004-06-17 18:06:43 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-17 18:06:43 -0700
commit3bdafaa17a0e56f117a8efa088ef8e3c749c07e0 (patch)
treec0c55235dba9edefa2c6431d25444ceae7559370 /init
parente7f32b95b106d6e127a16a64874288424a45e709 (diff)
downloadhistory-3bdafaa17a0e56f117a8efa088ef8e3c749c07e0.tar.gz
[PATCH] Use numa policy API for boot time policy
Suggested by Manfred Spraul. __get_free_pages had a hack to do node interleaving allocation at boot time. This patch sets an interleave process policy using the NUMA API for init and the idle threads instead. Before entering the user space init the policy is reset to default again. Result is the same. Advantage is less code and removing of a check from a fast path. Removes more code than it adds. I verified that the memory distribution after boot is roughly the same. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 613aaaba89f8ff..3f9e9e74ab000d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -43,6 +43,7 @@
#include <linux/efi.h>
#include <linux/unistd.h>
#include <linux/rmap.h>
+#include <linux/mempolicy.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -385,6 +386,7 @@ static void __init smp_init(void)
static void noinline rest_init(void)
{
kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
+ numa_default_policy();
unlock_kernel();
cpu_idle();
}
@@ -456,6 +458,7 @@ asmlinkage void __init start_kernel(void)
#endif
mem_init();
kmem_cache_init();
+ numa_policy_init();
if (late_time_init)
late_time_init();
calibrate_delay();
@@ -645,6 +648,7 @@ static int init(void * unused)
free_initmem();
unlock_kernel();
system_state = SYSTEM_RUNNING;
+ numa_default_policy();
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk("Warning: unable to open an initial console.\n");