Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
On Thu, Jun 23, 2016 at 02:37:39PM -0500, Reza Arbab wrote: Could it be that the functions just need to be renamed hash__create_mapping()/radix__create_mapping() and moved out of #ifdef SPARSEMEM_VMEMMAP? Or vice-versa, maybe the callers should have been wrapped in the first place

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
On Thu, Jun 23, 2016 at 10:47:20PM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: These functions are making direct calls to the hash table APIs, leading to a BUG() on systems using radix. Switch them to the vmemmap_{create,remove}_mapping() wrappers, an

[PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-23 Thread Reza Arbab
These functions are making direct calls to the hash table APIs, leading to a BUG() on systems using radix. Switch them to the vmemmap_{create,remove}_mapping() wrappers, and move to the __meminit section. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/mem

Re: powerpc,numa: Memory hotplug to memory-less nodes ?

2016-05-11 Thread Reza Arbab
ome of this? I've recently bumped into the same limitation. Could we consider removing it? (I couldn't find the original distribution list for this thread. Please add whomever is appropriate to the Cc:) -- Reza Arbab ___ Linuxppc-dev mailing list Linuxppc-

Re: mm: Initialise per_cpu_nodestats for all online pgdats at boot

2016-08-11 Thread Reza Arbab
On Thu, Aug 11, 2016 at 10:28:08AM +0100, Mel Gorman wrote: Fix looks ok. Can you add a proper changelog to it including an example oops or do you need me to do it? Sure, no problem. Patch to follow. -- Reza Arbab

[PATCH] mm: Initialize per_cpu_nodestats for hotadded pgdats

2016-08-11 Thread Reza Arbab
zation to the hotplug codepath. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- mm/memory_hotplug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3894b65..41266dc 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -12

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

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

Re: mm: Initialise per_cpu_nodestats for all online pgdats at boot

2016-08-10 Thread Reza Arbab
@ -1249,6 +1250,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) static void rollback_node_hotadd(int nid, pg_data_t *pgdat) { arch_refresh_nodedata(nid, NULL); + free_percpu(pgdat->per_cpu_nodestats); arch_free_nodedata(pgdat); return; } -- Reza Arbab

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 <ar...@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/

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

[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

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

2016-08-08 Thread Reza Arbab
Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- .../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/Documen

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

2016-08-08 Thread Reza Arbab
] 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): dt-binding

[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 <ar...@linux.vnet.ibm.com> --- 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 8

[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 <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 inse

Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix

2016-06-29 Thread Reza Arbab
creation? The other question is what radix__remove_section_mapping() should do. I don't know offhand what the opposite of map_kernel_page() is. As Aneesh mentioned, radix vmemmap removal is currently stubbed as a FIXME so I couldn't use that as a reference. -- R

[RFC v2 1/2] powerpc/mm: refactor {create,remove}_section_mapping()

2016-08-17 Thread Reza Arbab
Change {create,remove}_section_mapping() to be inline wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__" variants. No functional change. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include

[RFC v2 0/2] powerpc/mm: enable memory hotplug on radix

2016-08-17 Thread Reza Arbab
out, they are tied to CONFIG_SPARSEMEM_VMEMMAP and only did what I needed by luck anyway. v1: * https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (2): powerpc/mm: refactor {create,remove}_section_mapping() powerpc/mm: add radix__{create,remove

[RFC v2 2/2] powerpc/mm: add radix__{create, remove}_section_mapping()

2016-08-17 Thread Reza Arbab
Add radix variants of the memory hotplug mapping functions. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 5 + arch/powerpc/include/asm/sparsemem.h | 8 arch/powerpc/mm/pgtable-radix.c

Re: [PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-30 Thread Reza Arbab
are you ending up with -Werror=maybe-uninitialized? On powerpc/next, with pseries_le_defconfig, I get -Wno-maybe-uninitialized. -- Reza Arbab

[PATCH] powerpc/mm: use the correct pointer when setting a 2M pte

2017-01-25 Thread Reza Arbab
When setting a 2M pte, radix__map_kernel_page() is using the address ptep = (pte_t *)pudp; Fix this conversion to use pmdp instead. Use pmdp_ptep() to do this instead of casting the pointer. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix

Re: [PATCH v5 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-17 Thread Reza Arbab
-0600, Reza Arbab wrote: #ifdef CONFIG_MEMORY_HOTPLUG +static void free_pte_table(pte_t *pte_start, pmd_t *pmd) +{ + pte_t *pte; + int i; + + for (i = 0; i < PTRS_PER_PTE; i++) { + pte = pte_start + i; + if (!pte_none(*

Re: [PATCH v5 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-17 Thread Reza Arbab
On Tue, Jan 17, 2017 at 12:55:13PM +0530, Balbir Singh wrote: On Mon, Jan 16, 2017 at 01:07:46PM -0600, Reza Arbab wrote: Use remove_pagetable() and friends for radix vmemmap removal. We do not require the special-case handling of vmemmap done in the x86 versions of these functions

Re: [PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-17 Thread Reza Arbab
Thanks for your review! On Tue, Jan 17, 2017 at 12:16:35PM +0530, Balbir Singh wrote: On Mon, Jan 16, 2017 at 01:07:43PM -0600, Reza Arbab wrote: --- a/arch/powerpc/mm/pgtable-radix.c +++ b/arch/powerpc/mm/pgtable-radix.c @@ -107,54 +107,66 @@ int radix__map_kernel_page(unsigned long ea

[PATCH v5 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-16 Thread Reza Arbab
ends of the range. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 88 +++-- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 6

[PATCH v5 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-16 Thread Reza Arbab
WARNs, but otherwise the code to remove physical mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powe

[PATCH v5 2/4] powerpc/mm: add radix__create_section_mapping()

2017-01-16 Thread Reza Arbab
Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/p

[PATCH v5 0/4] powerpc/mm: enable memory hotplug on radix

2017-01-16 Thread Reza Arbab
* https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: refactor radix physical page mapping powerpc/mm: add radix__create_section_mapping() powerpc/mm: add radix__remove_section_mapping() powerpc/mm: unstub radix__vmemmap_remove_mapping

[PATCH v5 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-16 Thread Reza Arbab
-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c| 133 + 3 files changed, 135 insertions(+), 1 deletion(-) diff

Re: Normal service will resume shortly ...

2017-01-16 Thread Reza Arbab
/1483475991-16999-1-git-send-email-ar...@linux.vnet.ibm.com (aka http://patchwork.ozlabs.org/patch/710629/) -- Reza Arbab

Re: mm: Initialise per_cpu_nodestats for all online pgdats at boot

2016-08-04 Thread Reza Arbab
! Tested-by: Reza Arbab <ar...@linux.vnet.ibm.com> -- Reza Arbab

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

2016-09-14 Thread Reza Arbab
ot 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 on pow

[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 <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 inse

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

2016-09-14 Thread Reza Arbab
/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com> Cc: B

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

2016-09-14 Thread Reza Arbab
al in the future (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 <ar...@linux.vnet.ibm.com> --- drivers/of/fdt.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/of/fdt.c b/

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 <ar...@linux.vnet.ibm.com> wrote: + status = of_get_flat_dt_prop(node, "status", NULL); + add_memory = !status || !strcmp(status, "okay"); Move t

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

2016-09-26 Thread Reza Arbab
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

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 nodes

[PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-06 Thread Reza Arbab
bottom-up memblock allocation. Since #ifdef CONFIG_MOVABLE_NODE will no longer be enough to restrict this option to x86, move it to an arch-specific compilation unit instead. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/x86/mm/numa.c | 35 +++

[PATCH v4 1/5] drivers/of: introduce of_fdt_device_is_available()

2016-10-06 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 v4 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-06 Thread Reza Arbab
/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsinghar..

[PATCH v4 5/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-06 Thread Reza Arbab
that a movable node can be created by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- mm/Kconfig | 2 +- 1 file changed, 1 insertion

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

2016-10-06 Thread Reza Arbab
no longer has any bearing on whether the pgdat is created at 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 (5): drivers/of: introduce of_fdt_device_is_available() drivers/of: do not add me

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

2016-10-06 Thread Reza Arbab
mething is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index b138efb..0

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

2016-09-21 Thread Reza Arbab
h_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 requires CONFIG_MOVABLE_NODE". -- Reza Arbab

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

2016-09-21 Thread Reza Arbab
mal 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

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

2016-09-20 Thread Reza Arbab
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

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

[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 <

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

2016-09-25 Thread Reza Arbab
mething is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9241c6e..5

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

2016-09-25 Thread Reza Arbab
://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 allocation when usi

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

2016-09-25 Thread Reza Arbab
/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com> Cc: B

[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 <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2

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

2016-09-26 Thread Reza Arbab
being added in the patch. -- Reza Arbab

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

2016-09-26 Thread Reza Arbab
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 hotplug at runtime. -- Reza Arbab

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-26 Thread Reza Arbab
were going to be. Yes, sorry, I should have qualified that statement to say I wasn't talking about pseries. I can amend this set to actually implement movable_node on power too, but we'd have to settle on a name for the dt property. Is "linux,movable-node" too on the nose? -- Reza Arbab

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-25 Thread Reza Arbab
s that way. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-08 Thread Reza Arbab
} Ah, I need to adjust for !CONFIG_HAVE_MEMBLOCK. Will correct in v7. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-09 Thread Reza Arbab
On Wed, Nov 09, 2016 at 12:12:55PM -0600, Rob Herring wrote: On Mon, Nov 7, 2016 at 5:44 PM, Reza Arbab <ar...@linux.vnet.ibm.com> wrote: + hotpluggable = of_get_flat_dt_prop(node, "linux,hotpluggable", NULL); Memory being hotpluggable doesn't seem like a linux property

[PATCH v6 3/4] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-11-07 Thread Reza Arbab
by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Sin

[PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-07 Thread Reza Arbab
, configs supporting early fdt may then also do this marking and use movable nodes. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- drivers/of/fdt.c | 6 ++ mm/Kconfig | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c

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

2016-11-07 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-of

[PATCH v6 2/4] mm: remove x86-only restriction of movable_node

2016-11-07 Thread Reza Arbab
setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 -

[PATCH v6 0/4] enable movable nodes on non-x86 configs

2016-11-07 Thread Reza Arbab
g/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: allow memory hotplug into a memoryless node mm: remove x86-only restriction of movable_node mm: enable CONFIG_MOVABLE_NODE on non-x86 arches of/fdt: mark hotpluggable memory Documentation/kernel-parame

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-10 Thread Reza Arbab
On Thu, Nov 10, 2016 at 11:56:02AM +1100, Balbir Singh wrote: Have you tested this across all combinations of skiboot/kexec/SLOF boots? I've tested it under qemu/grub, simics/skiboot, and via kexec. -- Reza Arbab

Re: [PATCH] powerpc/mm: simplify loop control in parse_numa_properties()

2016-10-14 Thread Reza Arbab
On Fri, Oct 14, 2016 at 11:33:12AM +1100, Michael Ellerman wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: The flow of the main loop in parse_numa_properties() is overly complicated. Simplify it to be less confusing and easier to read. No functional change. I think you're right, bu

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

2016-10-22 Thread Reza Arbab
patibility issue Alistair describes. -- Reza Arbab

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-25 Thread Reza Arbab
thin. 2. Shouldn't we be marking nodes discovered as movable via memblock_mark_hotplug()? Again, this early boot marking mechanism only applies to movable_node. -- Reza Arbab

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

2016-10-24 Thread Reza Arbab
sabled and we don't know about it, and by changing the kernel to use that property we break people's systems. Though for memory nodes my guess is that's not true, but you never know ... -- Reza Arbab

[PATCH v5 2/3] mm: make processing of movable_node arch-specific

2016-10-24 Thread Reza Arbab
bottom-up memblock allocation. Since #ifdef CONFIG_MOVABLE_NODE will no longer be enough to restrict this option to x86, move it to an arch-specific compilation unit instead. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.co

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

2016-10-24 Thread Reza Arbab
compatible id. * Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at 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

[PATCH v5 3/3] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-24 Thread Reza Arbab
that a movable node can be created by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <

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

2016-10-24 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-of

Re: [PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-15 Thread Reza Arbab
they are added. There is no gap between the addition and the marking, as there is on x86, during which an allocation might accidentally occur in a movable node. -- Reza Arbab

Re: [RESEND] [PATCH v1 3/3] powerpc: fix node_possible_map limitations

2016-11-16 Thread Reza Arbab
On Wed, Nov 16, 2016 at 10:45:01AM +1100, Balbir Singh wrote: Reverts: commit 3af229f2071f ("powerpc/numa: Reset node_possible_map to only node_online_map") Nice! With this limitation going away, I have a small patch to enable onlining new nodes via memory hotplug. Incoming. -- Reza Arbab

[PATCH] powerpc/mm: allow memory hotplug into an offline node

2016-11-16 Thread Reza Arbab
e addition will actually cause the node to be initialized and onlined; add_memory_resource() calls hotadd_new_pgdat() (if necessary) and node_set_online(). Cc: Balbir Singh <bsinghar...@gmail.com> Cc: Nathan Fontenot <nf...@linux.vnet.ibm.com> Cc: John Allen <jal...@linux.vnet.ibm.com> S

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
documentation. Hopefully I've explained it well enough there. -- Reza Arbab

[PATCH v7 3/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-11-14 Thread Reza Arbab
by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Sin

[PATCH v7 4/5] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
, configs supporting early fdt may then also do this marking and use movable nodes. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> Tested-by: Balbir Singh <bsinghar...@gmail.com> --- drivers/of/fdt.c | 19 +++ include/linux/of_fdt.h | 1 + mm/Kconfig

[PATCH v7 5/5] dt: add documentation of "hotpluggable" memory property

2016-11-14 Thread Reza Arbab
Summarize the "hotpluggable" property of dt memory nodes. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/devicetree/booting-without-of.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt

[PATCH v7 0/5] enable movable nodes on non-x86 configs

2016-11-14 Thread Reza Arbab
bm,hotplug-aperture" compatible id. * Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.i

[PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-14 Thread Reza Arbab
setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 -

[PATCH v7 1/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-14 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Signed-of

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

2016-10-20 Thread Reza Arbab
. -- Reza Arbab

[PATCH] powerpc/mm: simplify loop control in parse_numa_properties()

2016-10-13 Thread Reza Arbab
The flow of the main loop in parse_numa_properties() is overly complicated. Simplify it to be less confusing and easier to read. No functional change. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/numa.c | 11 +++ 1 file changed, 3 insertions(+), 8 del

[PATCH v3 2/5] powerpc/mm: refactor {create, remove}_section_mapping()

2016-12-15 Thread Reza Arbab
Change {create,remove}_section_mapping() to be wrappers around functions prefixed with "hash__". This is preparation for the addition of their "radix__" variants. No functional change. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include

[PATCH v3 4/5] powerpc/mm: add radix__remove_section_mapping()

2016-12-15 Thread Reza Arbab
Tear down and free the four-level page tables of the linear mapping during memory hotremove. We borrow the basic structure of remove_pagetable() and friends from the identically-named x86 functions. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/boo

[PATCH v3 3/5] powerpc/mm: add radix__create_section_mapping()

2016-12-15 Thread Reza Arbab
Add the linear page mapping function for radix, used by memory hotplug. This is similar to vmemmap_populate(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powe

[PATCH v3 5/5] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2016-12-15 Thread Reza Arbab
WARNs, but otherwise the code to remove linear mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/p

[PATCH v3 1/5] powerpc/mm: set the radix linear page mapping size

2016-12-15 Thread Reza Arbab
This was defaulting to 4K, regardless of PAGE_SIZE. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 623a0dc..54bd70e

[PATCH v3 0/5] powerpc/mm: enable memory hotplug on radix

2016-12-15 Thread Reza Arbab
esh and Michael pointed out, they are tied to CONFIG_SPARSEMEM_VMEMMAP and only did what I needed by luck anyway. v1: * https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (5): powerpc/mm: set the radix linear page mapping size powerpc/mm: refactor {cre

[PATCH] powerpc/mm: fix memory hotplug BUG() on radix

2017-01-03 Thread Reza Arbab
() into hash__ and radix__ variants. Leave the radix versions stubbed for now. Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsinghar...@gmail.com> Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- It was suggested that this fix be separ

[PATCH v4 2/4] powerpc/mm: add radix__create_section_mapping()

2017-01-03 Thread Reza Arbab
Wire up memory hotplug page mapping for radix. Share the mapping function already used by radix_init_pgtable(). Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 4 arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/p

[PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-03 Thread Reza Arbab
must be offline to be removed, thus not in use. So there shouldn't be the sort of concurrent page walking activity here that might prompt us to use RCU. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/radix.h | 1 + arch/powerpc/mm/pgtable-book

[PATCH v4 0/4] powerpc/mm: enable memory hotplug on radix

2017-01-03 Thread Reza Arbab
what I needed by luck anyway. v1: * https://lkml.kernel.org/r/1466699962-22412-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: refactor radix physical page mapping powerpc/mm: add radix__create_section_mapping() powerpc/mm: add radix__remove_section_mapping() powerpc/mm:

[PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-03 Thread Reza Arbab
ends of the range. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 69 ++--- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/pgtable-radix.c index 6

[PATCH v4 4/4] powerpc/mm: unstub radix__vmemmap_remove_mapping()

2017-01-03 Thread Reza Arbab
WARNs, but otherwise the code to remove physical mappings is already sufficient for vmemmap. Signed-off-by: Reza Arbab <ar...@linux.vnet.ibm.com> --- arch/powerpc/mm/pgtable-radix.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powe

Re: [PATCH v4 1/4] powerpc/mm: refactor radix physical page mapping

2017-01-04 Thread Reza Arbab
here a way to dump the range and the size with which we mapped that range ? Sure. It's a little more difficult than before, because the mapping size is now reselected in each iteration of the loop, but a similar print can be done. -- Reza Arbab

Re: [PATCH v4 3/4] powerpc/mm: add radix__remove_section_mapping()

2017-01-04 Thread Reza Arbab
On Wed, Jan 04, 2017 at 10:37:58AM +0530, Aneesh Kumar K.V wrote: Reza Arbab <ar...@linux.vnet.ibm.com> writes: +static void remove_pagetable(unsigned long start, unsigned long end) +{ + unsigned long addr, next; + pud_t *pud_base; + pgd_t *pgd; + + spi

  1   2   >