Re: [PATCH 1/4] create mm/Kconfig for arch-independent memoryoptions

From: Dave Hansen
Date: Thu Apr 07 2005 - 11:40:15 EST


Hi Roman,

How does the attached patch look? It will still give us the flexibility
to override the memory models, but only in the presence of
CONFIG_EXPERIMENTAL.

It also adds some better help text to the DISCONTIGMEM menu. Is that
something like what you were looking for?

-- Dave


---

memhotplug-dave/mm/Kconfig | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)

diff -puN mm/Kconfig~Kconfig-experimenta mm/Kconfig
--- memhotplug/mm/Kconfig~Kconfig-experimenta 2005-04-07 09:24:59.000000000 -0700
+++ memhotplug-dave/mm/Kconfig 2005-04-07 09:32:06.000000000 -0700
@@ -1,9 +1,10 @@
choice
prompt "Memory model"
- default DISCONTIGMEM if ARCH_DISCONTIGMEM_DEFAULT
- default FLATMEM
+ depends on EXPERIMENTAL
+ default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT
+ default FLATMEM_MANUAL

-config FLATMEM
+config FLATMEM_MANUAL
bool "Flat Memory"
depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE
help
@@ -14,14 +15,32 @@ config FLATMEM

If unsure, choose this option over any other.

-config DISCONTIGMEM
+config DISCONTIGMEM_MANUAL
bool "Discontigious Memory"
depends on ARCH_DISCONTIGMEM_ENABLE
help
+ This option provides enhanced support for discontiguous
+ memory systems, over FLATMEM. These systems have holes
+ in their physical address spaces, and this option provides
+ more efficient handling of these holes. However, the vast
+ majority of hardware has quite flat address spaces, and
+ can have degraded performance from extra overhead that
+ this option imposes.
+
+ Many NUMA configurations will have this as the only option.
+
If unsure, choose "Flat Memory" over this option.

endchoice

+config DISCONTIGMEM
+ def_bool y
+ depends on (!EXPERIMENTAL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL
+
+config FLATMEM
+ def_bool y
+ depends on !DISCONTIGMEM || FLATMEM_MANUAL
+
#
# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's
# to represent different areas of memory. This variable allows
_