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


Groups > linux.kernel > #1650699 > unrolled thread

[PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

Started byMichael Bringmann <mwb@linux.vnet.ibm.com>
First post2017-05-25 19:40 +0200
Last post2017-05-26 07:40 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-25 19:40 +0200
    Re: [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node  assoc Balbir Singh <bsingharora@gmail.com> - 2017-05-26 05:30 +0200
      Re: [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-26 14:30 +0200
    Re: [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-05-26 07:40 +0200

#1650699 — [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

FromMichael Bringmann <mwb@linux.vnet.ibm.com>
Date2017-05-25 19:40 +0200
Subject[PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Message-ID<tL4TU-2Ht-27@gated-at.bofh.it>
Removing or adding memory via the PowerPC hotplug interface shows
anomalies in the association between memory and nodes.  The code
was updated to ensure that all nodes found at boot are still available
to subsequent DLPAR hotplug-memory operations, even if they are not
needed at boot time.

Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
---
Changes in V2:
  -- Simplify patches to ensure more nodes in possible map, removing
     code from PowerPC numa.c that constrained possible map to size
     of online map.
---
 arch/powerpc/mm/numa.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 15c2dd5..18f3038 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -907,13 +907,6 @@ void __init initmem_init(void)
 
 	memblock_dump_all();
 
-	/*
-	 * Reduce the possible NUMA nodes to the online NUMA nodes,
-	 * since we do not support node hotplug. This ensures that  we
-	 * lower the maximum NUMA node ID to what is actually present.
-	 */
-	nodes_and(node_possible_map, node_possible_map, node_online_map);
-
 	for_each_online_node(nid) {
 		unsigned long start_pfn, end_pfn;
 

[toc] | [next] | [standalone]


#1651054 — Re: [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

FromBalbir Singh <bsingharora@gmail.com>
Date2017-05-26 05:30 +0200
SubjectRe: [PATCH V2 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Message-ID<tLe6S-xj-5@gated-at.bofh.it>
In reply to#1650699
On Thu, 25 May 2017 12:37:40 -0500
Michael Bringmann <mwb@linux.vnet.ibm.com> wrote:

> Removing or adding memory via the PowerPC hotplug interface shows
> anomalies in the association between memory and nodes.  The code
> was updated to ensure that all nodes found at boot are still available
> to subsequent DLPAR hotplug-memory operations, even if they are not
> needed at boot time.
> 
> Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
> ---
> Changes in V2:
>   -- Simplify patches to ensure more nodes in possible map, removing
>      code from PowerPC numa.c that constrained possible map to size
>      of online map.
> ---
>  arch/powerpc/mm/numa.c |    7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index 15c2dd5..18f3038 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -907,13 +907,6 @@ void __init initmem_init(void)
>  
>  	memblock_dump_all();
>  
> -	/*
> -	 * Reduce the possible NUMA nodes to the online NUMA nodes,
> -	 * since we do not support node hotplug. This ensures that  we
> -	 * lower the maximum NUMA node ID to what is actually present.
> -	 */
> -	nodes_and(node_possible_map, node_possible_map, node_online_map);
> -

There is an overhead with turning this off if you have too many cgroups
with the memory controller. I think this fix was added for a pathological
test case. On my system I see 84 cgroups with 1 node, so the probable
overhead is 84*255*sizeof(struct mem_cgroup_tree_per_node).

I tried some patches to reduce the overhead, but those need more overhauling
and rework.

Balbir Singh.

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


#1651357

FromMichael Bringmann <mwb@linux.vnet.ibm.com>
Date2017-05-26 14:30 +0200
Message-ID<tLmxr-5Rf-7@gated-at.bofh.it>
In reply to#1651054
>>  arch/powerpc/mm/numa.c |    7 -------
>>  1 file changed, 7 deletions(-)
>>
>> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
>> index 15c2dd5..18f3038 100644
>> --- a/arch/powerpc/mm/numa.c
>> +++ b/arch/powerpc/mm/numa.c
>> @@ -907,13 +907,6 @@ void __init initmem_init(void)
>>  
>>  	memblock_dump_all();
>>  
>> -	/*
>> -	 * Reduce the possible NUMA nodes to the online NUMA nodes,
>> -	 * since we do not support node hotplug. This ensures that  we
>> -	 * lower the maximum NUMA node ID to what is actually present.
>> -	 */
>> -	nodes_and(node_possible_map, node_possible_map, node_online_map);
>> -
> 
> There is an overhead with turning this off if you have too many cgroups
> with the memory controller. I think this fix was added for a pathological
> test case. On my system I see 84 cgroups with 1 node, so the probable
> overhead is 84*255*sizeof(struct mem_cgroup_tree_per_node).
> 
> I tried some patches to reduce the overhead, but those need more overhauling
> and rework.

Is there some other way to add a node to a dynamic, running system without
crashing?  I have not encountered one as yet.

> Balbir Singh.

-- 
Michael W. Bringmann
Linux Technology Center
IBM Corporation
Tie-Line  363-5196
External: (512) 286-5196
Cell:       (512) 466-0650
mwb@linux.vnet.ibm.com

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


#1651086

FromMichael Ellerman <mpe@ellerman.id.au>
Date2017-05-26 07:40 +0200
Message-ID<tLg8G-1N6-5@gated-at.bofh.it>
In reply to#1650699
Michael Bringmann <mwb@linux.vnet.ibm.com> writes:

> Removing or adding memory via the PowerPC hotplug interface shows
> anomalies in the association between memory and nodes.

What anomalies? Please describe the actual problem you're seeing, with
details, and why you think this is the correct fix.

This is a revert of 3af229f2071f ("powerpc/numa: Reset node_possible_map
to only node_online_map"), so please explain why all the things
mentioned in the change log for that commit are either wrong or no
longer true.

cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web