Skip to contentSkip to conversation

powerpc: enable CONFIG_HAVE_MEMORYLESS_NODES

PATCH In review Nishanth Aravamudan 3 participants 5 messages Jan 28, 2014 – Feb 14, 2014

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

PATCH 1/1 powerpc: enable CONFIG_HAVE_MEMORYLESS_NODES

Anton Blanchard found an issue with an LPAR that had no memory in Node
0. Christoph Lameter recommended, as one possible solution, to use numa_mem_id() for locality of the nearest memory node-wise. However, numa_mem_id() [and the other related APIs] are only useful if CONFIG_HAVE_MEMORYLESS_NODES is set. This is only the case for ia64 currently, but clearly we can have memoryless nodes on ppc64. Add the Kconfig option and define it to be the same value as CONFIG_NUMA.

On the LPAR in question, which was very inefficiently using slabs, this took the slab consumption at boot from roughly 7GB to roughly 4GB.

---
Ben, the only question I have wrt this change is if it's appropriate to change it for all powerpc configs (that have NUMA on)?

arch/powerpc/Kconfig +3 -0
index 25493a0..bb2d5fe 100644
@@ -447,6 +447,9 @@ config NODES_SHIFT
 	default "4"
 	depends on NEED_MULTIPLE_NODES
 
+config HAVE_MEMORYLESS_NODES
+	def_bool NUMA
+
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
 	depends on PPC64

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Nishanth Aravamudan

Anton Blanchard found an issue with an LPAR that had no memory in Node
0. Christoph Lameter recommended, as one possible solution, to use numa_mem_id() for locality of the nearest memory node-wise. However, numa_mem_id() [and the other related APIs] are only useful if CONFIG_HAVE_MEMORYLESS_NODES is set. This is only the case for ia64 currently, but clearly we can have memoryless nodes on ppc64. Add the Kconfig option and define it to be the same value as CONFIG_NUMA.

Well this is trivial but if you need encouragement:

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
In reply to Nishanth Aravamudan
Quoted 10 lines · Nishanth Aravamudan

Anton Blanchard found an issue with an LPAR that had no memory in Node
0. Christoph Lameter recommended, as one possible solution, to use numa_mem_id() for locality of the nearest memory node-wise. However, numa_mem_id() [and the other related APIs] are only useful if CONFIG_HAVE_MEMORYLESS_NODES is set. This is only the case for ia64 currently, but clearly we can have memoryless nodes on ppc64. Add the Kconfig option and define it to be the same value as CONFIG_NUMA.

On the LPAR in question, which was very inefficiently using slabs, this took the slab consumption at boot from roughly 7GB to roughly 4GB.

Err, this should have been

!

Sorry about that Ben!

Quoted 9 lines

---
Ben, the only question I have wrt this change is if it's appropriate to change it for all powerpc configs (that have NUMA on)?

arch/powerpc/Kconfig +0 -0
index 25493a0..bb2d5fe 100644

arch/powerpc/Kconfig config NODES_SHIFT · line 455

Quoted 9 lines
arch/powerpc/Kconfig +3 -0
@@ -447,6 +447,9 @@ config NODES_SHIFT
 	default "4"
 	depends on NEED_MULTIPLE_NODES
 
+config HAVE_MEMORYLESS_NODES
+	def_bool NUMA
+
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
 	depends on PPC64

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 11 lines · Nishanth Aravamudan
Quoted 10 lines

Anton Blanchard found an issue with an LPAR that had no memory in Node
0. Christoph Lameter recommended, as one possible solution, to use numa_mem_id() for locality of the nearest memory node-wise. However, numa_mem_id() [and the other related APIs] are only useful if CONFIG_HAVE_MEMORYLESS_NODES is set. This is only the case for ia64 currently, but clearly we can have memoryless nodes on ppc64. Add the Kconfig option and define it to be the same value as CONFIG_NUMA.

On the LPAR in question, which was very inefficiently using slabs, this took the slab consumption at boot from roughly 7GB to roughly 4GB.

Quoted 12 lines

Err, this should have been

!

Sorry about that Ben!

Quoted 4 lines

---
Ben, the only question I have wrt this change is if it's appropriate to change it for all powerpc configs (that have NUMA on)?

I'm suspecting that Ben will request that the proper set_numa_mem() calls are done for ppc init to make this actually do anything other than return numa_mem_id() == numa_node_id().

Quoted 14 lines
Quoted 14 lines
arch/powerpc/Kconfig +3 -0
index 25493a0..bb2d5fe 100644
@@ -447,6 +447,9 @@ config NODES_SHIFT
 	default "4"
 	depends on NEED_MULTIPLE_NODES
 
+config HAVE_MEMORYLESS_NODES
+	def_bool NUMA
+
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
 	depends on PPC64
#4 lore raw
Quoted 21 lines · David Rientjes
Quoted 19 lines · Nishanth Aravamudan
Quoted 10 lines

Anton Blanchard found an issue with an LPAR that had no memory in Node
0. Christoph Lameter recommended, as one possible solution, to use numa_mem_id() for locality of the nearest memory node-wise. However, numa_mem_id() [and the other related APIs] are only useful if CONFIG_HAVE_MEMORYLESS_NODES is set. This is only the case for ia64 currently, but clearly we can have memoryless nodes on ppc64. Add the Kconfig option and define it to be the same value as CONFIG_NUMA.

On the LPAR in question, which was very inefficiently using slabs, this took the slab consumption at boot from roughly 7GB to roughly 4GB.

Err, this should have been

!

Sorry about that Ben!

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

---
Ben, the only question I have wrt this change is if it's appropriate to change it for all powerpc configs (that have NUMA on)?

I'm suspecting that Ben will request that the proper set_numa_mem() calls are done for ppc init to make this actually do anything other than return numa_mem_id() == numa_node_id().

You're right, thanks for pointing this out. I could have sworn that in my previous debugging I saw proper NUMA information, but perhaps it was just correct based upon the system configuration.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/powerpc/Kconfig +0 -0
index 25493a0..bb2d5fe 100644
@@ -447,6 +447,9 @@ config NODES_SHIFT
 	default "4"
 	depends on NEED_MULTIPLE_NODES
 
Quoted 7 lines
Quoted 6 lines

arch/powerpc/Kconfig config NODES_SHIFT · line 455

Quoted 6 lines
arch/powerpc/Kconfig +3 -0
+config HAVE_MEMORYLESS_NODES
+	def_bool NUMA
+
 config ARCH_SELECT_MEMORY_MODEL
 	def_bool y
 	depends on PPC64

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>