From: Vlastimil Babka <vbabka@xxxxxxx> Subject: 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@xxxxxxx Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Yang Shi <yang.shi@xxxxxxxxxx> Cc: Laura Abbott <labbott@xxxxxxxxxx> Cc: Vinayak Menon <vinmenon@xxxxxxxxxxxxxx> Cc: zhong jiang <zhongjiang@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_ext.c | 1 + 1 file changed, 1 insertion(+) diff -puN mm/page_ext.c~mm-page_ext-periodically-reschedule-during-page_ext_init mm/page_ext.c --- a/mm/page_ext.c~mm-page_ext-periodically-reschedule-during-page_ext_init +++ a/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); _ -- 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