Skip to contentSkip to conversation

mm, page_ext: periodically reschedule during page_ext_init()

PATCH In review [email protected] 1 participant 1 message Sep 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 40/119 mm, page_ext: periodically reschedule during page_ext_init()

From: Vlastimil Babka <[email protected]>
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.

---

 mm/page_ext.c |    1 +
 1 file changed, 1 insertion(+)
mm/page_ext.c renamed from mm/page_ext.c~mm-page_ext-periodically-reschedule-during-page_ext_init +1 -0
diff -puN mm/page_ext.c~mm-page_ext-periodically-reschedule-during-page_ext_init 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);

_