Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457976 > unrolled thread

[PATCH 0/4] powerpc/mm: movable hotplug memory nodes

Started byReza Arbab <arbab@linux.vnet.ibm.com>
First post2016-08-08 20:30 +0200
Last post2016-08-10 21:50 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] powerpc/mm: movable hotplug memory nodes Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-08-08 20:30 +0200
    [PATCH 2/4] powerpc/mm: create numa nodes for hotplug memory Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-08-08 20:30 +0200
    Re: [PATCH 0/4] powerpc/mm: movable hotplug memory nodes Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-08-10 20:50 +0200
    Re: [PATCH 0/4] powerpc/mm: movable hotplug memory nodes Nathan Fontenot <nfont@linux.vnet.ibm.com> - 2016-08-10 21:50 +0200
    Re: [PATCH 0/4] powerpc/mm: movable hotplug memory nodes Michael Ellerman <mpe@ellerman.id.au> - 2016-08-10 21:50 +0200

#1457976 — [PATCH 0/4] powerpc/mm: movable hotplug memory nodes

FromReza Arbab <arbab@linux.vnet.ibm.com>
Date2016-08-08 20:30 +0200
Subject[PATCH 0/4] powerpc/mm: movable hotplug memory nodes
Message-ID<s3Xtf-4VJ-7@gated-at.bofh.it>
These changes enable onlining memory into ZONE_MOVABLE on power, and the
creation of discrete nodes of movable memory.

Node hotplug is not supported on power [1]. The approach taken instead is to
create a memoryless placeholder node for the designated address range at boot.
Hotplug and onlining of the memory are then done in the usual way.

The numa code on power currently prevents hotplugging to a memoryless node.
This limitation has been questioned before [2], and judging by the response,
there doesn't seem to be a reason we can't remove it. No issues have been
found in light testing.

[1] commit 3af229f ("powerpc/numa: Reset node_possible_map to only node_online_map")
[2] http://lkml.kernel.org/r/CAGZKiBrmkSa1yyhbf5hwGxubcjsE5SmkSMY4tpANERMe2UG4bg@mail.gmail.com
    http://lkml.kernel.org/r/20160511215051.GF22115@arbab-laptop.austin.ibm.com

Reza Arbab (4):
  dt-bindings: add doc for ibm,hotplug-aperture
  powerpc/mm: create numa nodes for hotplug memory
  powerpc/mm: allow memory hotplug into a memoryless node
  mm: enable CONFIG_MOVABLE_NODE on powerpc

 .../bindings/powerpc/opal/hotplug-aperture.txt     | 26 ++++++++++++++++++++++
 Documentation/kernel-parameters.txt                |  2 +-
 arch/powerpc/mm/numa.c                             | 23 ++++++++-----------
 mm/Kconfig                                         |  2 +-
 4 files changed, 37 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/powerpc/opal/hotplug-aperture.txt

-- 
1.8.3.1

[toc] | [next] | [standalone]


#1457978 — [PATCH 2/4] powerpc/mm: create numa nodes for hotplug memory

FromReza Arbab <arbab@linux.vnet.ibm.com>
Date2016-08-08 20:30 +0200
Subject[PATCH 2/4] powerpc/mm: create numa nodes for hotplug memory
Message-ID<s3Xtg-4VJ-19@gated-at.bofh.it>
In reply to#1457976
When scanning the device tree to initialize the system NUMA topology,
process dt elements with compatible id "ibm,hotplug-aperture" to create
memoryless numa nodes.

These nodes will be filled when hotplug occurs within the associated
address range.

Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 75b9cd6..80d067d 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -708,6 +708,12 @@ static void __init parse_drconf_memory(struct device_node *memory)
 	}
 }
 
+static const struct of_device_id memory_match[] = {
+	{ .type = "memory" },
+	{ .compatible = "ibm,hotplug-aperture" },
+	{ /* sentinel */ }
+};
+
 static int __init parse_numa_properties(void)
 {
 	struct device_node *memory;
@@ -752,7 +758,7 @@ static int __init parse_numa_properties(void)
 
 	get_n_mem_cells(&n_mem_addr_cells, &n_mem_size_cells);
 
-	for_each_node_by_type(memory, "memory") {
+	for_each_matching_node(memory, memory_match) {
 		unsigned long start;
 		unsigned long size;
 		int nid;
@@ -1080,7 +1086,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr)
 	struct device_node *memory;
 	int nid = -1;
 
-	for_each_node_by_type(memory, "memory") {
+	for_each_matching_node(memory, memory_match) {
 		unsigned long start, size;
 		int ranges;
 		const __be32 *memcell_buf;
-- 
1.8.3.1

[toc] | [prev] | [next] | [standalone]


#1459507

FromReza Arbab <arbab@linux.vnet.ibm.com>
Date2016-08-10 20:50 +0200
Message-ID<s4GJI-j6-59@gated-at.bofh.it>
In reply to#1457976
On Wed, Aug 10, 2016 at 08:30:28PM +1000, Michael Ellerman wrote:
>Reza Arbab <arbab@linux.vnet.ibm.com> writes:
>> Node hotplug is not supported on power [1].
>
>But maybe it should be?

Doing so will involve, at the very least, reverting the commit I cited, 
3af229f2071f ("powerpc/numa: Reset node_possible_map to only 
node_online_map"), and fixing that issue in a different way.

I'll look into it and see what I can do.

-- 
Reza Arbab

[toc] | [prev] | [next] | [standalone]


#1459713

FromNathan Fontenot <nfont@linux.vnet.ibm.com>
Date2016-08-10 21:50 +0200
Message-ID<s4HFM-12V-35@gated-at.bofh.it>
In reply to#1457976
On 08/10/2016 05:30 AM, Michael Ellerman wrote:
> Reza Arbab <arbab@linux.vnet.ibm.com> writes:
> 
>> These changes enable onlining memory into ZONE_MOVABLE on power, and the
>> creation of discrete nodes of movable memory.
>>
>> Node hotplug is not supported on power [1].
> 
> But maybe it should be?
> 
Yes, it should be supported.

I have briefly looked into this recently only to find
this will not be a simple update.

-Nathan 

[toc] | [prev] | [next] | [standalone]


#1459719

FromMichael Ellerman <mpe@ellerman.id.au>
Date2016-08-10 21:50 +0200
Message-ID<s4GJI-j6-61@gated-at.bofh.it>
In reply to#1457976
Reza Arbab <arbab@linux.vnet.ibm.com> writes:

> These changes enable onlining memory into ZONE_MOVABLE on power, and the
> creation of discrete nodes of movable memory.
>
> Node hotplug is not supported on power [1].

But maybe it should be?

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web