Skip to contentSkip to conversation

mm: Move pgtable_cache_init() earlier

PATCH Benjamin Herrenschmidt 2 participants 2 messages Jun 17, 2009 Memory management

lore
Share & tools
lore
#0 lore raw

Some architectures need to initialize SLAB caches to be able to allocate page tables. They do that from pgtable_cache_init() so the later should be called earlier now, best is before vmalloc_init().

---

Note: Only powerpc, sparc and xtensa use this and only to call kmem_cache_create() so with a bit of luck it should just work...

init/main.c +1 -1
Index: linux-work/init/main.c
===================================================================
@@ -546,6 +546,7 @@ static void __init mm_init(void)
 	page_cgroup_init_flatmem();
 	mem_init();
 	kmem_cache_init();
+	pgtable_cache_init();
 	vmalloc_init();
 }
 
@@ -684,7 +685,6 @@ asmlinkage void __init start_kernel(void
 		late_time_init();
 	calibrate_delay();
 	pidmap_init();
-	pgtable_cache_init();
 	anon_vma_init();
 #ifdef CONFIG_X86
 	if (efi_enabled)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by
#1 lore raw

Hi Ben,

Quoted 6 lines · Benjamin Herrenschmidt

Some architectures need to initialize SLAB caches to be able to allocate page tables. They do that from pgtable_cache_init() so the later should be called earlier now, best is before vmalloc_init().

Looks good to me!

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>