Memory model configuration cleanups. I got some feedback from users who think that the new "Memory Model" menu is a little invasive. This patch will hide that menu, except when CONFIG_EXPERIMENTAL is enabled *or* when an individual architecture wants it. For architectures that do allow selection of the memory model, allow each memory model to be included or excluded from the model list. Also, gives DISCONTIGMEM a bit more help text to explain what it does, not just when to choose it. Signed-off-by: Dave Hansen Signed-off-by: Andy Whitcroft --- arch/mips/Kconfig | 4 ---- arch/parisc/Kconfig | 4 ---- arch/sh/Kconfig | 4 ---- mm/Kconfig | 31 +++++++++++++++++++++++++++---- 4 files changed, 27 insertions(+), 16 deletions(-) diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/mips/Kconfig current/arch/mips/Kconfig --- reference/arch/mips/Kconfig 2005-05-09 16:32:49.000000000 +0100 +++ current/arch/mips/Kconfig 2005-05-09 16:32:49.000000000 +0100 @@ -501,10 +501,6 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. -config ARCH_FLATMEM_DISABLE - def_bool y - depends on ARCH_DISCONTIGMEM_ENABLE - config NUMA bool "NUMA Support" depends on SGI_IP27 diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/parisc/Kconfig current/arch/parisc/Kconfig --- reference/arch/parisc/Kconfig 2005-05-09 16:32:49.000000000 +0100 +++ current/arch/parisc/Kconfig 2005-05-09 16:32:49.000000000 +0100 @@ -153,10 +153,6 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. -config ARCH_FLATMEM_DISABLE - def_bool y - depends on ARCH_DISCONTIGMEM_ENABLE - source "mm/Kconfig" config PREEMPT diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/sh/Kconfig current/arch/sh/Kconfig --- reference/arch/sh/Kconfig 2005-05-09 16:32:49.000000000 +0100 +++ current/arch/sh/Kconfig 2005-05-09 16:32:49.000000000 +0100 @@ -496,10 +496,6 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. -config ARCH_FLATMEM_DISABLE - def_bool y - depends on ARCH_DISCONTIGMEM_ENABLE - source "mm/Kconfig" config ZERO_PAGE_OFFSET diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/mm/Kconfig current/mm/Kconfig --- reference/mm/Kconfig 2005-05-09 16:32:49.000000000 +0100 +++ current/mm/Kconfig 2005-05-09 16:32:51.000000000 +0100 @@ -1,9 +1,14 @@ +config SELECT_MEMORY_MODEL + def_bool y + depends on EXPERIMENTAL || ARCH_SELECT_MEMORY_MODEL + choice prompt "Memory model" - default DISCONTIGMEM if ARCH_DISCONTIGMEM_DEFAULT - default FLATMEM + depends on SELECT_MEMORY_MODEL + 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 +19,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 (!SELECT_MEMORY_MODEL && 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