From: Vlastimil Babka Date: Wed, 6 Sep 2017 23:20:48 +0000 (-0700) Subject: mm, page_ext: periodically reschedule during page_ext_init() X-Git-Tag: v4.14-rc1~126^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fc542b7dd90a7080fc1a8c846d13a4ddad509ba;p=platform%2Fkernel%2Flinux-exynos.git mm, page_ext: periodically reschedule during page_ext_init() page_ext_init() can take long on large machines, so add a cond_resched() point after each section is processed. This will allow moving the init to a later point at boot without triggering lockup reports. Link: http://lkml.kernel.org/r/20170720134029.25268-3-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Joonsoo Kim Cc: Mel Gorman Cc: Yang Shi Cc: Laura Abbott Cc: Vinayak Menon Cc: zhong jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_ext.c b/mm/page_ext.c index 714ce79..32f1891 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -406,6 +406,7 @@ void __init page_ext_init(void) continue; if (init_section_page_ext(pfn, nid)) goto oom; + cond_resched(); } } hotplug_memory_notifier(page_ext_callback, 0);