summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-06-17 18:19:04 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-06-17 18:19:04 +0000
commit393addaa7de250bc3f8b47d2cf6ae16ba8f2c5e5 (patch)
tree31bdd4e56abef2eea0b8353809f86ac6c65d5241 /sys
parentf45fefc55d6a66fbe2ebcb3c5c86b65d76ff4bb5 (diff)
Make sure we do not coalesce memory ranges from different nodes.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sgi/sgi/sginode.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c
index 99737457027..eee159bc0a8 100644
--- a/sys/arch/sgi/sgi/sginode.c
+++ b/sys/arch/sgi/sgi/sginode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sginode.c,v 1.8 2009/06/13 16:28:11 miod Exp $ */
+/* $OpenBSD: sginode.c,v 1.9 2009/06/17 18:19:03 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
*
@@ -369,6 +369,14 @@ kl_add_memory_ip27(int16_t nasid, int16_t *sizes, unsigned int cnt)
if (md->mem_first_page == 0)
break;
+ /*
+ * Do not try to merge segments if they are
+ * not covering the same node.
+ */
+ if ((ptoa(md->mem_first_page) >> kl_n_shift) !=
+ nasid)
+ continue;
+
if (md->mem_first_page == lp &&
lp != atop(2 << 30)) {
md->mem_first_page = fp;
@@ -460,6 +468,14 @@ kl_add_memory_ip35(int16_t nasid, int16_t *sizes, unsigned int cnt)
if (md->mem_first_page == 0)
break;
+ /*
+ * Do not try to merge segments if they are
+ * not covering the same node.
+ */
+ if ((ptoa(md->mem_first_page) >> kl_n_shift) !=
+ nasid)
+ continue;
+
if (md->mem_first_page == lp &&
lp != atop(2 << 30)) {
md->mem_first_page = fp;