From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: paulus@samba.org, linux-kernel@vger.kernel.org, nathanl@austin.ibm.com
Subject: [PATCH] ppc64: Make NUMA code handle unexpected layouts
Date: Tue, 11 Jan 2005 02:19:50 +1100 [thread overview]
Message-ID: <20050110151950.GY14239@krispykreme.ozlabs.ibm.com> (raw)
In-Reply-To: <20050110144339.GW14239@krispykreme.ozlabs.ibm.com>
From: Nathan Lynch <nathanl@austin.ibm.com>
Ran into this on a 4GB partition - all but about ~300MB was thrown away.
Does this look ok? It works for me, but I've not tested on firmware
without the bug.
Fall back to non-numa setup upon discovering unexpected memory layout
as presented by firmware, instead of throwing away regions.
Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Acked-by: Anton Blanchard <anton@samba.org>
diff -puN arch/ppc64/mm/numa.c~numa_broke_fix arch/ppc64/mm/numa.c
--- foobar2/arch/ppc64/mm/numa.c~numa_broke_fix 2005-01-10 23:36:39.922337007 +1100
+++ foobar2-anton/arch/ppc64/mm/numa.c 2005-01-10 23:46:46.069205815 +1100
@@ -345,8 +345,6 @@ new_range:
numa_domain = 0;
}
- node_set_online(numa_domain);
-
if (max_domain < numa_domain)
max_domain = numa_domain;
@@ -361,14 +359,19 @@ new_range:
init_node_data[numa_domain].node_start_pfn +
init_node_data[numa_domain].node_spanned_pages;
if (shouldstart != (start / PAGE_SIZE)) {
- printk(KERN_ERR "WARNING: Hole in node, "
- "disabling region start %lx "
- "length %lx\n", start, size);
- continue;
+ /* Revert to non-numa for now */
+ printk(KERN_ERR
+ "WARNING: Unexpected node layout: "
+ "region start %lx length %lx\n",
+ start, size);
+ printk(KERN_ERR "NUMA is disabled\n");
+ goto err;
}
init_node_data[numa_domain].node_spanned_pages +=
size / PAGE_SIZE;
} else {
+ node_set_online(numa_domain);
+
init_node_data[numa_domain].node_start_pfn =
start / PAGE_SIZE;
init_node_data[numa_domain].node_spanned_pages =
@@ -388,6 +391,14 @@ new_range:
node_set_online(i);
return 0;
+err:
+ /* Something has gone wrong; revert any setup we've done */
+ for_each_node(i) {
+ node_set_offline(i);
+ init_node_data[i].node_start_pfn = 0;
+ init_node_data[i].node_spanned_pages = 0;
+ }
+ return -1;
}
static void __init setup_nonnuma(void)
_
prev parent reply other threads:[~2005-01-10 15:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-10 13:38 [PATCH] ppc64: PCI cleanup Anton Blanchard
2005-01-10 13:41 ` [PATCH] ppc64: Remove flush_instruction_cache Anton Blanchard
2005-01-10 14:35 ` [PATCH] ppc64: interrupt code cleanup Anton Blanchard
2005-01-10 14:43 ` [PATCH] ppc64: Fix rtas_set_indicator(9005) Anton Blanchard
2005-01-10 15:19 ` Anton Blanchard [this message]
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=20050110151950.GY14239@krispykreme.ozlabs.ibm.com \
--to=anton@samba.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathanl@austin.ibm.com \
--cc=paulus@samba.org \
/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
all inboxes | Powered by JetHome®