linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] memhotplug testing: hack for flat systems
@ 2005-09-30 15:25 Dave Hansen
  2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2005-09-30 15:25 UTC (permalink / raw)
  To: magnus; +Cc: linux-mm, Dave Hansen

Before this patch, the sparse code is only hooked into the NUMA
subarchitectures on i386.  This patch makes sure that normal,
contiguous systems get their memory put into sparsemem correctly.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 arch/i386/mach-default/setup.c           |    0 
 memhotplug-dave/arch/i386/kernel/setup.c |    8 ++++++++
 2 files changed, 8 insertions(+)

diff -puN arch/i386/kernel/setup.c~C1-memory_present-for-contig-systems arch/i386/kernel/setup.c
--- memhotplug/arch/i386/kernel/setup.c~C1-memory_present-for-contig-systems	2005-09-29 12:33:19.000000000 -0700
+++ memhotplug-dave/arch/i386/kernel/setup.c	2005-09-29 12:33:19.000000000 -0700
@@ -978,6 +978,12 @@ efi_find_max_pfn(unsigned long start, un
 	return 0;
 }
 
+static int __init
+efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
+{
+	memory_present(0, start, end);
+	return 0;
+}
 
 /*
  * Find the highest page frame number we have available
@@ -989,6 +995,7 @@ void __init find_max_pfn(void)
 	max_pfn = 0;
 	if (efi_enabled) {
 		efi_memmap_walk(efi_find_max_pfn, &max_pfn);
+		efi_memmap_walk(efi_memory_present_wrapper, NULL);
 		return;
 	}
 
@@ -1003,6 +1010,7 @@ void __init find_max_pfn(void)
 			continue;
 		if (end > max_pfn)
 			max_pfn = end;
+		memory_present(0, start, end);
 	}
 }
 
diff -puN mm/Kconfig~C1-memory_present-for-contig-systems mm/Kconfig
diff -puN mm/page_alloc.c~C1-memory_present-for-contig-systems mm/page_alloc.c
diff -L build_zonelists_fix -puN /dev/null /dev/null
diff -puN arch/i386/mm/init.c~C1-memory_present-for-contig-systems arch/i386/mm/init.c
diff -puN arch/i386/mach-default/setup.c~C1-memory_present-for-contig-systems arch/i386/mach-default/setup.c
diff -L arch/i386/mm/setup.c -puN /dev/null /dev/null
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 2/2] memhotplug testing: enable sparsemem on flat systems
  2005-09-30 15:25 [PATCH 1/2] memhotplug testing: hack for flat systems Dave Hansen
@ 2005-09-30 15:25 ` Dave Hansen
  2005-10-03  5:40   ` Magnus Damm
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2005-09-30 15:25 UTC (permalink / raw)
  To: magnus; +Cc: linux-mm, Dave Hansen

---

 memhotplug-dave/arch/i386/Kconfig |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletion(-)

diff -puN arch/i386/Kconfig~C2-enable-i386-sparsemem-debug arch/i386/Kconfig
--- memhotplug/arch/i386/Kconfig~C2-enable-i386-sparsemem-debug	2005-09-29 12:40:42.000000000 -0700
+++ memhotplug-dave/arch/i386/Kconfig	2005-09-29 12:41:22.000000000 -0700
@@ -799,9 +799,23 @@ config ARCH_DISCONTIGMEM_DEFAULT
 	def_bool y
 	depends on NUMA
 
+config X86_SPARSEMEM_DEBUG_NONUMA
+	bool "Enable SPARSEMEM on flat systems (debugging only)"
+	depends on !NUMA && EXPERIMENTAL
+	select SPARSEMEM_STATIC
+	select SPARSEMEM_MANUAL
+
+config ARCH_MEMORY_PROBE
+	def_bool y
+	depends on X86_SPARSEMEM_DEBUG_NONUMA
+
+config ARCH_SPARSEMEM_DEFAULT
+	def_bool y
+	depends on X86_SPARSEMEM_DEBUG_NONUMA
+
 config ARCH_SPARSEMEM_ENABLE
 	def_bool y
-	depends on NUMA
+	depends on NUMA || X86_SPARSEMEM_DEBUG_NONUMA
 
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 2/2] memhotplug testing: enable sparsemem on flat systems
  2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
@ 2005-10-03  5:40   ` Magnus Damm
  0 siblings, 0 replies; 3+ messages in thread
From: Magnus Damm @ 2005-10-03  5:40 UTC (permalink / raw)
  To: Dave Hansen; +Cc: magnus, linux-mm

Hi again,

I've tested this patch together with the "hack for flat
systems"-patch, and they seem to work correctly both configured as
single-node sparsemem PC and configured as emulated NUMA system
together with the NUMA emulation patches.

So these patches replace my patch "[PATCH 05/07] i386: sparsemem on pc".

Thanks,

/ magnus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2005-10-03  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-30 15:25 [PATCH 1/2] memhotplug testing: hack for flat systems Dave Hansen
2005-09-30 15:25 ` [PATCH 2/2] memhotplug testing: enable sparsemem on " Dave Hansen
2005-10-03  5:40   ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox