Skip to contentSkip to conversation

IA64: Sparse and Discontig Mem need NUMA

PATCH In review Simon Horman 2 participants 3 messages May 2, 2007 – May 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IA64: Sparse and Discontig Mem need NUMA

It was pointed out to me by my colleague Yamahata-san that neither sparse nor discontig mem compile without NUMA support.

Cc Alex Williamson <[email protected]>
Cc Isaku Yamahata <[email protected]>

---
This seems line an issue best solved by prohibiting such settings through Kconfig. But if it is desirable for sparse and discontig memory to work without CONFIG_NUMA let me know and I'll have a stab at it. It does seem possible code-wise. I'm just not sure if its useful.

Index: linux-2.6/arch/ia64/Kconfig
=================================--- linux-2.6.orig/arch/ia64/Kconfig 2007-05-02 16:42:22.000000000 +0900
+++ linux-2.6/arch/ia64/Kconfig 2007-05-02 16:42:26.000000000 +0900
@@ -337,6 +337,7 @@ config ARCH_SELECT_MEMORY_MODEL

config ARCH_DISCONTIGMEM_ENABLE
def_bool y
+ depends on NUMA
help
Say Y to support efficient handling of discontiguous physical memory, for architectures which are either NUMA (Non-Uniform Memory Access)
@@ -345,6 +346,7 @@ config ARCH_DISCONTIGMEM_ENABLE

config ARCH_FLATMEM_ENABLE
def_bool y
+ depends on !NUMA

config ARCH_SPARSEMEM_ENABLE
def_bool y
@@ -356,7 +358,7 @@ config ARCH_DISCONTIGMEM_DEFAULT

config NUMA
bool "NUMA support"
- depends on !IA64_HP_SIM && !FLATMEM
+ depends on !IA64_HP_SIM
default y if IA64_SGI_SN2
select ACPI_NUMA if ACPI
help

#1 lore raw
Quoted 4 lines

This seems line an issue best solved by prohibiting such settings through Kconfig. But if it is desirable for sparse and discontig memory to work without CONFIG_NUMA let me know and I'll have a stab at it. It does seem possible code-wise. I'm just not sure if its useful.

I pretty sure that we used to be able to build for a DISCONTIG but non-NUMA system ... this is a quite common case, systems with >4G of memory put the first 2G at 0-2G, reserve the 2G-4G area for PCI memory mapped devices (and other platform specific stuff) then the rest of RAM is at some >4G address. With just a 2G hole it is possible to paper over it, but some systems put the extra memory at much higher addresses.

But it would be nice to reduce the CONFIG maze ... so perhaps we should ponder what overhead such a system would suffer by having to be built as CONFIG_NUMA=y. If this is small, then perhaps we can simplify things.

-Tony

#2 lore raw
In reply to Simon Horman
Quoted 5 lines · Tony
Quoted 4 lines

This seems line an issue best solved by prohibiting such settings through Kconfig. But if it is desirable for sparse and discontig memory to work without CONFIG_NUMA let me know and I'll have a stab at it. It does seem possible code-wise. I'm just not sure if its useful.

Quoted 7 lines

I pretty sure that we used to be able to build for a DISCONTIG but non-NUMA system ... this is a quite common case, systems with >4G of memory put the first 2G at 0-2G, reserve the 2G-4G area for PCI memory mapped devices (and other platform specific stuff) then the rest of RAM is at some >4G address. With just a 2G hole it is possible to paper over it, but some systems put the extra memory at much higher addresses.

I did take a look at what it would take to allow Sparse to compile in non-NUMA. It seemed that Sparse was very much centered around NUMA so I wondered how useful the result might be. I will take a look into Discontig and see what is required there.

Quoted 4 lines

But it would be nice to reduce the CONFIG maze ... so perhaps we should ponder what overhead such a system would suffer by having to be built as CONFIG_NUMA=y. If this is small, then perhaps we can simplify things.

I guess it might be a bit tricky to measure that comprehensively. But it would certainly make things easier. I think that the patch I sent implements what you are suggesting, though perhaps it isn't exactly what you had in mind.

Signature · 3 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/