All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Compile error on x86 with hotplug but no highmem
@ 2006-01-27 10:17 Mel Gorman
  2006-01-27 20:02 ` Dave Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Mel Gorman @ 2006-01-27 10:17 UTC (permalink / raw)
  To: akpm; +Cc: Linux Memory Management List

Memory hotplug without highmem is meaningless but it is still an allowed
configuration. This is one possible fix. Another is to not allow memory
hotplug without high memory being available. Another is to take
online_page() outside of the #ifdef CONFIG_HIGHMEM block in init.c .


Signed-off-by: Mel Gorman <mel@csn.ul.ie>

diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.16-rc1-mm3-clean/arch/i386/mm/init.c linux-2.6.16-rc1-mm3-nohighmemhotplug/arch/i386/mm/init.c
--- linux-2.6.16-rc1-mm3-clean/arch/i386/mm/init.c	2006-01-25 13:42:41.000000000 +0000
+++ linux-2.6.16-rc1-mm3-nohighmemhotplug/arch/i386/mm/init.c	2006-01-27 10:10:26.000000000 +0000
@@ -324,6 +324,7 @@ static void __init set_highmem_pages_ini
 #define kmap_init() do { } while (0)
 #define permanent_kmaps_init(pgd_base) do { } while (0)
 #define set_highmem_pages_init(bad_ppro) do { } while (0)
+void online_page(struct page *page) {}
 #endif /* CONFIG_HIGHMEM */

 unsigned long long __PAGE_KERNEL = _PAGE_KERNEL;

--
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] Compile error on x86 with hotplug but no highmem
  2006-01-27 10:17 [PATCH] Compile error on x86 with hotplug but no highmem Mel Gorman
@ 2006-01-27 20:02 ` Dave Hansen
  2006-01-29 15:59   ` Mel Gorman
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Hansen @ 2006-01-27 20:02 UTC (permalink / raw)
  To: Mel Gorman; +Cc: akpm, Linux Memory Management List

On Fri, 2006-01-27 at 10:17 +0000, Mel Gorman wrote:
> Memory hotplug without highmem is meaningless but it is still an allowed
> configuration. This is one possible fix. Another is to not allow memory
> hotplug without high memory being available. Another is to take
> online_page() outside of the #ifdef CONFIG_HIGHMEM block in init.c .

If it is meaningless, then we should probably fix it in the Kconfig
file, not just work around it at runtime.

What we really want is something to tell us that the architecture
_supports_ highmem and isn't using it.  Maybe something like this?

in mm/Kconfig:

config MEMORY_HOTPLUG
	depends on ... && !ARCH_HAS_DISABLED_HIGHMEM

in arch/i386/Kconfig:

config ARCH_HAS_DISABLED_HIGHMEM
	def_bool n
	depends on !HIGHMEM

-- Dave

--
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] Compile error on x86 with hotplug but no highmem
  2006-01-27 20:02 ` Dave Hansen
@ 2006-01-29 15:59   ` Mel Gorman
  0 siblings, 0 replies; 3+ messages in thread
From: Mel Gorman @ 2006-01-29 15:59 UTC (permalink / raw)
  To: Dave Hansen; +Cc: Linux Memory Management List

On Fri, 27 Jan 2006, Dave Hansen wrote:

> On Fri, 2006-01-27 at 10:17 +0000, Mel Gorman wrote:
> > Memory hotplug without highmem is meaningless but it is still an allowed
> > configuration. This is one possible fix. Another is to not allow memory
> > hotplug without high memory being available. Another is to take
> > online_page() outside of the #ifdef CONFIG_HIGHMEM block in init.c .
>
> If it is meaningless, then we should probably fix it in the Kconfig
> file, not just work around it at runtime.
>
> What we really want is something to tell us that the architecture
> _supports_ highmem and isn't using it.  Maybe something like this?
>
> in mm/Kconfig:
>
> config MEMORY_HOTPLUG
> 	depends on ... && !ARCH_HAS_DISABLED_HIGHMEM
>
> in arch/i386/Kconfig:
>
> config ARCH_HAS_DISABLED_HIGHMEM
> 	def_bool n
> 	depends on !HIGHMEM
>

As HIGHMEM is not a requirement for hotplug on all architectures, I
changed the idea slightly to have the arch say when it does not have a
zone suitable for hotplug. How does this look?

diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.16-rc1-mm3-clean/arch/i386/Kconfig linux-2.6.16-rc1-mm3-nohotplug/arch/i386/Kconfig
--- linux-2.6.16-rc1-mm3-clean/arch/i386/Kconfig	2006-01-29 15:08:27.000000000 +0000
+++ linux-2.6.16-rc1-mm3-nohotplug/arch/i386/Kconfig	2006-01-29 15:38:55.000000000 +0000
@@ -446,6 +446,10 @@ config HIGHMEM64G
 	  Select this if you have a 32-bit processor and more than 4
 	  gigabytes of physical RAM.

+config ARCH_HAS_NO_HOTPLUG_ZONE
+	def_bool y
+	depends on NOHIGHMEM
+
 endchoice

 choice
diff -rup -X /usr/src/patchset-0.5/bin//dontdiff linux-2.6.16-rc1-mm3-clean/mm/Kconfig linux-2.6.16-rc1-mm3-nohotplug/mm/Kconfig
--- linux-2.6.16-rc1-mm3-clean/mm/Kconfig	2006-01-17 07:44:47.000000000 +0000
+++ linux-2.6.16-rc1-mm3-nohotplug/mm/Kconfig	2006-01-29 15:37:16.000000000 +0000
@@ -115,7 +115,7 @@ config SPARSEMEM_EXTREME
 # eventually, we can have this option just 'select SPARSEMEM'
 config MEMORY_HOTPLUG
 	bool "Allow for memory hot-add"
-	depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND
+	depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND && !ARCH_HAS_NO_HOTPLUG_ZONE

 comment "Memory hotplug is currently incompatible with Software Suspend"
 	depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND

--
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:[~2006-01-29 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-27 10:17 [PATCH] Compile error on x86 with hotplug but no highmem Mel Gorman
2006-01-27 20:02 ` Dave Hansen
2006-01-29 15:59   ` Mel Gorman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.