From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935086AbdGTNkn (ORCPT ); Thu, 20 Jul 2017 09:40:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:41934 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934094AbdGTNkk (ORCPT ); Thu, 20 Jul 2017 09:40:40 -0400 From: Vlastimil Babka To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Joonsoo Kim , Andrew Morton , Michal Hocko , Mel Gorman , Yang Shi , Laura Abbott , Vinayak Menon , zhong jiang , Vlastimil Babka Subject: [PATCH 2/4] mm, page_ext: periodically reschedule during page_ext_init() Date: Thu, 20 Jul 2017 15:40:27 +0200 Message-Id: <20170720134029.25268-3-vbabka@suse.cz> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170720134029.25268-1-vbabka@suse.cz> References: <20170720134029.25268-1-vbabka@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Vlastimil Babka --- mm/page_ext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/page_ext.c b/mm/page_ext.c index 88ccc044b09a..24cf8abefc8d 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -409,6 +409,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); -- 2.13.2