[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya89aqij6nMwJrIZ@dhcp22.suse.cz>
Date: Tue, 7 Dec 2021 11:54:34 +0100
From: Michal Hocko <mhocko@...e.com>
To: Alexey Makhalov <amakhalov@...are.com>
Cc: Dennis Zhou <dennis@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
David Hildenbrand <david@...hat.com>,
Oscar Salvador <osalvador@...e.de>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH v3] mm: fix panic in __alloc_pages
Hi,
I didn't have much time to dive into this deeper and I have hit some
problems handling this in an arch specific code so I have tried to play
with this instead:
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c5952749ad40..4d71759d0d9b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8032,8 +8032,16 @@ void __init free_area_init(unsigned long *max_zone_pfn)
/* Initialise every node */
mminit_verify_pageflags_layout();
setup_nr_node_ids();
- for_each_online_node(nid) {
+ for_each_node(nid) {
pg_data_t *pgdat = NODE_DATA(nid);
+
+ if (!node_online(nid)) {
+ pr_warn("Node %d uninitialized by the platform. Please report with memory map.\n");
+ alloc_node_data(nid);
+ free_area_init_memoryless_node(nid);
+ continue;
+ }
+
free_area_init_node(nid);
/* Any memory on that node */
Could you give it a try? I do not have any machine which would exhibit
the problem so I cannot really test this out. I hope build_zone_info
will not choke on this. I assume the node distance table is
uninitialized for these nodes and IIUC this should lead to an assumption
that all other nodes are close. But who knows that can blow up there.
Btw. does this make any sense at all to others?
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists