xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: don't defer struct page initialization for Xen pv guests
@ 2018-02-16 13:37 Juergen Gross
  0 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2018-02-16 13:37 UTC (permalink / raw)
  To: linux-kernel, linux-mm, xen-devel; +Cc: Juergen Gross, akpm, mhocko, stable

Commit f7f99100d8d95dbcf09e0216a143211e79418b9f ("mm: stop zeroing
memory during allocation in vmemmap") broke Xen pv domains in some
configurations, as the "Pinned" information in struct page of early
page tables could get lost.

Avoid this problem by not deferring struct page initialization when
running as Xen pv guest.

Cc: <stable@vger.kernel.org> #4.15
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 mm/page_alloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 81e18ceef579..681d504b9a40 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -347,6 +347,9 @@ static inline bool update_defer_init(pg_data_t *pgdat,
 	/* Always populate low zones for address-constrained allocations */
 	if (zone_end < pgdat_end_pfn(pgdat))
 		return true;
+	/* Xen PV domains need page structures early */
+	if (xen_pv_domain())
+		return true;
 	(*nr_initialised)++;
 	if ((*nr_initialised > pgdat->static_init_pgcnt) &&
 	    (pfn & (PAGES_PER_SECTION - 1)) == 0) {
-- 
2.13.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-20 23:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180216133726.30813-1-jgross@suse.com>
2018-02-16 13:59 ` [PATCH] mm: don't defer struct page initialization for Xen pv guests Michal Hocko
     [not found] ` <20180216135940.GQ7275@dhcp22.suse.cz>
2018-02-16 14:02   ` Juergen Gross
     [not found]   ` <1424bb25-7d6a-ee21-83b4-0e90369d6132@suse.com>
2018-02-16 14:21     ` Pavel Tatashin
2018-02-16 14:28     ` Michal Hocko
2018-02-18 18:45 ` kbuild test robot
2018-02-20 23:21   ` Andrew Morton
2018-02-16 13:37 Juergen Gross

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).