linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: move page_ext_init after all struct pages are initialized
@ 2016-05-19 21:29 Yang Shi
  2016-05-19 22:30 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Yang Shi @ 2016-05-19 21:29 UTC (permalink / raw)
  To: akpm, iamjoonsoo.kim; +Cc: linux-kernel, linux-mm, linaro-kernel, yang.shi

When DEFERRED_STRUCT_PAGE_INIT is enabled, just a subset of memmap at boot
are initialized, then the rest are initialized in parallel by starting one-off
"pgdatinitX" kernel thread for each node X.

If page_ext_init is called before it, some pages will not have valid extension,
so move page_ext_init() after it.

CC: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
 init/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/init/main.c b/init/main.c
index b3c6e36..2075faf 100644
--- a/init/main.c
+++ b/init/main.c
@@ -606,7 +606,6 @@ asmlinkage __visible void __init start_kernel(void)
 		initrd_start = 0;
 	}
 #endif
-	page_ext_init();
 	debug_objects_mem_init();
 	kmemleak_init();
 	setup_per_cpu_pageset();
@@ -1004,6 +1003,8 @@ static noinline void __init kernel_init_freeable(void)
 	sched_init_smp();
 
 	page_alloc_init_late();
+	/* Initialize page ext after all struct pages are initializaed */
+	page_ext_init();
 
 	do_basic_setup();
 
-- 
2.0.2

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-19 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 21:29 [PATCH] mm: move page_ext_init after all struct pages are initialized Yang Shi
2016-05-19 22:30 ` Andrew Morton
2016-05-19 22:35   ` Shi, Yang
2016-05-19 23:21     ` Andrew Morton
2016-05-19 23:26       ` Shi, Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox