public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: keith mannthey <kmannth@us.ibm.com>
To: andrew <akpm@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Konrad redhat <konradr@redhat.com>,
	dzickus@redhat.com, lhms-devel <lhms-devel@lists.sourceforge.net>,
	Andi Kleen <ak@suse.de>
Subject: [Patch] x86_64 hot-add memroy srat.c fix
Date: Fri, 06 Oct 2006 15:53:49 -0700	[thread overview]
Message-ID: <1160175229.5663.23.camel@keithlap> (raw)

  This patch corrects the logic used in srat.c to figure out what
parsing what action to take when registering hot-add areas.  Hot-add
areas should only be added to the node information for the
MEMORY_HOTPLGU_RESERVE case.  When booting MEMORY_HOTPLUG_SPARSE hot-add
areas on everything but the last node are getting include in the node
data and during kernel boot the pages are setup then the kernel dies
when the pages are used. This patch fixes this issue.  It is based
against 2.6.19-rc1.  

Signed-off-by: Keith Mannthey <kmannth@us.ibm.com> 
---
srat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -urN linux-2.6.18/arch/x86_64/mm/srat.c linux-2.6.18-rc1/arch/x86_64/mm/srat.c
--- linux-2.6.18/arch/x86_64/mm/srat.c	2006-10-06 17:17:04.000000000 -0400
+++ linux-2.6.18-rc1/arch/x86_64/mm/srat.c	2006-10-06 16:29:59.000000000 -0400
@@ -207,7 +207,7 @@
 	return hotadd_percent > 0;
 }
 #else
-int update_end_of_memory(unsigned long end) {return 0;}
+int update_end_of_memory(unsigned long end) {return -1;}
 static int hotadd_enough_memory(struct bootnode *nd) {return 1;}
 #ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
 static inline int save_add_info(void) {return 1;}
@@ -337,7 +337,7 @@
 	push_node_boundaries(node, nd->start >> PAGE_SHIFT,
 						nd->end >> PAGE_SHIFT);
 
- 	if (ma->flags.hot_pluggable && !reserve_hotadd(node, start, end) < 0) {
+ 	if (ma->flags.hot_pluggable && (reserve_hotadd(node, start, end) < 0)) {
 		/* Ignore hotadd region. Undo damage */
 		printk(KERN_NOTICE "SRAT: Hotplug region ignored\n");
 		*nd = oldnode;



             reply	other threads:[~2006-10-06 22:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-06 22:53 keith mannthey [this message]
2006-10-16 10:01 ` [Patch] x86_64 hot-add memroy srat.c fix Andi Kleen
2006-10-16 18:56   ` keith mannthey

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=1160175229.5663.23.camel@keithlap \
    --to=kmannth@us.ibm.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=dzickus@redhat.com \
    --cc=konradr@redhat.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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