From: Vlastimil Babka <vbabka@suse.cz>
To: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Yang Shi <yang.shi@linaro.org>, Laura Abbott <labbott@redhat.com>,
Vinayak Menon <vinmenon@codeaurora.org>,
zhong jiang <zhongjiang@huawei.com>,
Vlastimil Babka <vbabka@suse.cz>
Subject: [PATCH 2/4] mm, page_ext: periodically reschedule during page_ext_init()
Date: Thu, 20 Jul 2017 15:40:27 +0200 [thread overview]
Message-ID: <20170720134029.25268-3-vbabka@suse.cz> (raw)
In-Reply-To: <20170720134029.25268-1-vbabka@suse.cz>
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 <vbabka@suse.cz>
---
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
--
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>
next prev parent reply other threads:[~2017-07-20 13:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 13:40 [PATCH 0/4] page_ext/page_owner init fixes Vlastimil Babka
2017-07-20 13:40 ` [PATCH 1/4] mm, page_owner: make init_pages_in_zone() faster Vlastimil Babka
2017-07-24 12:38 ` Michal Hocko
2017-08-23 6:47 ` Vlastimil Babka
2017-08-24 7:01 ` Vlastimil Babka
2017-09-06 13:38 ` Michal Hocko
2017-08-31 7:55 ` Vlastimil Babka
2017-09-06 13:49 ` Michal Hocko
2017-09-06 13:55 ` Vlastimil Babka
2017-09-06 14:32 ` Michal Hocko
2017-07-20 13:40 ` Vlastimil Babka [this message]
2017-07-24 12:45 ` [PATCH 2/4] mm, page_ext: periodically reschedule during page_ext_init() Michal Hocko
2017-07-20 13:40 ` [PATCH 3/4] mm, page_owner: don't grab zone->lock for init_pages_in_zone() Vlastimil Babka
2017-07-24 12:50 ` Michal Hocko
2017-07-20 13:40 ` [RFC PATCH 4/4] mm, page_ext: move page_ext_init() after page_alloc_init_late() Vlastimil Babka
2017-07-24 13:06 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170720134029.25268-3-vbabka@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=vinmenon@codeaurora.org \
--cc=yang.shi@linaro.org \
--cc=zhongjiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).