Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-10-04 Thread Reza Arbab
On Tue, Oct 04, 2016 at 11:48:30AM +1100, Balbir Singh wrote: On 27/09/16 10:14, Reza Arbab wrote: Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT can describe movable nodes which exist at boot. They're trying to avoid allocations from those

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Reza Arbab
know until some PCI device gets turned into CAPI mode and starts claiming LPC memory... Yes, this is what is planned for, if I'm understanding you correctly. In the dt, the PCI device node has a phandle pointing to the memory node. The memory node describes the window into which we can hotplu

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
ion. That is the missing call being added in the patch. -- Reza Arbab -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
on to movable node. Sure, we can do it earlier. The only consideration is that any potential calls to memblock_mark_hotplug() happen before we reset to top-down. Since we don't do that at all on power, the call can go anywhere. -- Reza Arbab -- To unsubscribe from this list: sen

[PATCH v3 2/5] drivers/of: do not add memory for unavailable nodes

2016-09-25 Thread Reza Arbab
is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9241c6e..59b772a 100644 --- a/drivers/o

[PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-25 Thread Reza Arbab
as the kernel image, which is necessarily in a nonmovable node. Then, once any known hotplug memory has been marked, allocation can be reset back to top-down. On x86, this is done in numa_init(). This patch does the same on power, in numa initmem_init(). Signed-off-by: Reza Arbab --- arch/powerpc

[PATCH v3 1/5] drivers/of: introduce of_fdt_is_available()

2016-09-25 Thread Reza Arbab
In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property. Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available(). Another caller will be added in a subsequent patch. Signed-off-by:

[PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-25 Thread Reza Arbab
, can_online_high_movable() will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. Enable the use of this config option on PPC64 platforms. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 insertions

[PATCH v3 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-09-25 Thread Reza Arbab
rnel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab Acked-by: Balbir Singh Cc: Nathan Fontenot Cc: Bharata B Rao --- arch/powerpc/mm/numa.c | 13 + 1 file changed, 1

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

2016-09-25 Thread Reza Arbab
n. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (5): drivers/of: introduce of_fdt_is_available() drivers/of: do not add memory for unavailable nodes powerpc/mm: allow memory hotplug into a memoryless node powerpc/mm: restore top-down allo

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Reza Arbab
e from normal to movable only if movable node is set. Also you may want to mention that we still don't support the auto-online to movable. Sure, no problem. I'll use a more verbose commit message in v3. -- Reza Arbab -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Reza Arbab
bool can_online_high_movable(struct zone *zone) { return node_state(zone_to_nid(zone), N_NORMAL_MEMORY); } #endif /* CONFIG_MOVABLE_NODE */ To be more clear, I can change the commit log to say "Onlining all of a node's memory into ZONE_MOVABLE re

Re: [PATCH v2 2/3] powerpc/mm: allow memory hotplug into a memoryless node

2016-09-20 Thread Reza Arbab
On Mon, Sep 19, 2016 at 09:53:49PM +1000, Balbir Singh wrote: I presume you've tested with CONFIG_NODES_SHIFT of 8 (255 nodes?) Oh yes, definitely. The large number of possible nodes does not come into play here. -- Reza Arbab -- To unsubscribe from this list: send the line "u

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-20 Thread Reza Arbab
lly adding movable nodes after boot. 1. http://events.linuxfoundation.org/sites/events/files/lcjp13_chen.pdf 2. commit 79442ed189ac ("mm/memblock.c: introduce bottom-up allocation mode") -- Reza Arbab -- To unsubscribe from this list: send the line "unsubscribe linux-doc&quo

Re: [PATCH v2 1/3] drivers/of: recognize status property of dt memory nodes

2016-09-15 Thread Reza Arbab
On Thu, Sep 15, 2016 at 08:43:08AM -0500, Rob Herring wrote: On Wed, Sep 14, 2016 at 3:06 PM, Reza Arbab wrote: + status = of_get_flat_dt_prop(node, "status", NULL); + add_memory = !status || !strcmp(status, "okay"); Move this into it's own function

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

2016-09-14 Thread Reza Arbab
boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (3): drivers/of: recognize status property of dt memory nodes powerpc/mm: allow memory hotplug into a memoryless node mm: enable CONFIG_MOVABLE_NODE o

[PATCH v2 2/3] powerpc/mm: allow memory hotplug into a memoryless node

2016-09-14 Thread Reza Arbab
rnel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab Acked-by: Balbir Singh Cc: Nathan Fontenot Cc: Bharata B Rao --- arch/powerpc/mm/numa.c | 13 + 1 file changed, 1

[PATCH v2 1/3] drivers/of: recognize status property of dt memory nodes

2016-09-14 Thread Reza Arbab
e (for example, something is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab --- drivers/of/fdt.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 085c638..fc1

[PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-14 Thread Reza Arbab
Onlining memory into ZONE_MOVABLE requires CONFIG_MOVABLE_NODE. Enable the use of this config option on PPC64 platforms. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [PATCH 3/4] powerpc/mm: allow memory hotplug into a memoryless node

2016-08-12 Thread Reza Arbab
On Fri, Aug 12, 2016 at 11:50:43AM +1000, Balbir Singh wrote: On 09/08/16 04:27, Reza Arbab wrote: Remove the check which prevents us from hotplugging into an empty node. Do we want to do this only for ibm,hotplug-aperture compatible ranges? We could, but since past discussions and current

Re: [PATCH 1/4] dt-bindings: add doc for ibm,hotplug-aperture

2016-08-11 Thread Reza Arbab
ven though OPAL may initially be the only implementor of the binding. Would it be more appropriate to move the file up a directory, directly under Documentation/devicetree/bindings/powerpc? I hesitated at that because the binding is tied to "ibm,associativity". -- Reza Arbab -- To u

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

2016-08-10 Thread Reza Arbab
On Wed, Aug 10, 2016 at 08:30:28PM +1000, Michael Ellerman wrote: Reza Arbab 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

[PATCH 1/4] dt-bindings: add doc for ibm,hotplug-aperture

2016-08-08 Thread Reza Arbab
Signed-off-by: Reza Arbab --- .../bindings/powerpc/opal/hotplug-aperture.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/powerpc/opal/hotplug-aperture.txt diff --git a/Documentation/devicetree/bindings/powerpc/opal

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

2016-08-08 Thread Reza Arbab
sting. [1] commit 3af229f ("powerpc/numa: Reset node_possible_map to only node_online_map") [2] http://lkml.kernel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Reza Arbab (4):

[PATCH 4/4] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-08-08 Thread Reza Arbab
Onlining memory into ZONE_MOVABLE requires CONFIG_MOVABLE_NODE. Enable the use of this config option on PPC64 platforms. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

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

2016-08-08 Thread Reza Arbab
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 --- arch/

[PATCH 3/4] powerpc/mm: allow memory hotplug into a memoryless node

2016-08-08 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. Signed-off-by: Reza Arbab --- arch/powerpc/mm/numa.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 80d067d..bc70c4f 100644 --- a/arch