Skip to contentSkip to conversation

Allow flatmem to be disabled when only sparsemem is implemented

PATCH In review Anton Blanchard 3 participants 4 messages Nov 11, 2005 – Nov 14, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow flatmem to be disabled when only sparsemem is implemented

Hi Andy,

What do you think about this?

Anton

--

On architectures that implement sparsemem but not discontigmem we want to be able to hide the flatmem option in some cases. On ppc64 for example, when we select NUMA we must not select flatmem.

---

mm/Kconfig +1 -1
Index: build/mm/Kconfig
===================================================================
@@ -11,7 +11,7 @@
 
 config FLATMEM_MANUAL
 	bool "Flat Memory"
-	depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE
+	depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || ARCH_FLATMEM_ENABLE
 	help
 	  This option allows you to change some of the ways that
 	  Linux manages its memory internally.  Most users will
#1 lore raw
Quoted 5 lines · Anton Blanchard

On architectures that implement sparsemem but not discontigmem we want to be able to hide the flatmem option in some cases. On ppc64 for example, when we select NUMA we must not select flatmem.

First reaction is that this is very reasonable. I can see why you need to do this as you don't have DISCONTIGMEM. I will just go check the major architectures and make sure they arn't relying on being able to enable SPARSEMEM and getting FLATMEM too behaviour. I don't think they can be as they all have DISCONTIGMEM and so should be insulated.

-apw

#2 lore raw
Quoted 11 lines · Andy Whitcroft
Quoted 3 lines · Anton Blanchard

On architectures that implement sparsemem but not discontigmem we want to be able to hide the flatmem option in some cases. On ppc64 for example, when we select NUMA we must not select flatmem.

First reaction is that this is very reasonable. I can see why you need to do this as you don't have DISCONTIGMEM. I will just go check the major architectures and make sure they arn't relying on being able to enable SPARSEMEM and getting FLATMEM too behaviour. I don't think they can be as they all have DISCONTIGMEM and so should be insulated.

Ok. I've reviewed the usage of the memory model selectors in the architectures in 2.6.14-mm2. It appears that only i386 is affected by this change, the others that use the selector have explicit enablement of FLATMEM. This patch will interact badly with the current code to enable SPARSEMEM on non-numa systems. However, this code is under review at this moment, and the proposed replacement (Message-ID:
<[email protected]>) is compatible with this change.

In short as long as they go in together this change looks good.

Magnus, any feedback on the replacement SPARSEMEM enabler on non-NUMA i386 systems??

-apw

#3 lore raw
Quoted 21 lines · Andy Whitcroft
Quoted 11 lines · Andy Whitcroft
Quoted 3 lines · Anton Blanchard

On architectures that implement sparsemem but not discontigmem we want to be able to hide the flatmem option in some cases. On ppc64 for example, when we select NUMA we must not select flatmem.

First reaction is that this is very reasonable. I can see why you need to do this as you don't have DISCONTIGMEM. I will just go check the major architectures and make sure they arn't relying on being able to enable SPARSEMEM and getting FLATMEM too behaviour. I don't think they can be as they all have DISCONTIGMEM and so should be insulated.

Ok. I've reviewed the usage of the memory model selectors in the architectures in 2.6.14-mm2. It appears that only i386 is affected by this change, the others that use the selector have explicit enablement of FLATMEM. This patch will interact badly with the current code to enable SPARSEMEM on non-numa systems. However, this code is under review at this moment, and the proposed replacement (Message-ID:
<[email protected]>) is compatible with this change.

Quoted 4 lines

In short as long as they go in together this change looks good.

Magnus, any feedback on the replacement SPARSEMEM enabler on non-NUMA i386 systems??

I tested your patch in QEMU on top of 2.6.15-rc1-git1 and it seems to work well. Many thanks!

/ magnus