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


Groups > linux.kernel > #1655778

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

From Reza Arbab <arbab@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Date 2017-06-01 23:40 +0200
Message-ID <tNFYZ-8b0-3@gated-at.bofh.it> (permalink)
References (5 earlier) <tLeqd-Ek-11@gated-at.bofh.it> <tLozf-73D-9@gated-at.bofh.it> <tMlzj-3SX-3@gated-at.bofh.it> <tNctZ-5S4-41@gated-at.bofh.it> <tNuKe-LA-17@gated-at.bofh.it>
Organization IBM Linux Technology Center

Show all headers | View raw


On Thu, Jun 01, 2017 at 07:36:31PM +1000, Michael Ellerman wrote:
>I don't think that's what the patch does. It just marks 32 (!?) nodes 
>as online. Or if you're talking about reverting 3af229f2071f that 
>leaves you with 256 possible nodes. Both of which are wasteful.

To be clear, with Balbir's set the latter is no longer wasteful.

>The right fix is to make sure any nodes which are present at boot 
>remain in the possible map, even if they don't have memory/CPUs 
>assigned at boot.

I'm still hoping 3af229f2071f could indeed be reverted some day, but 
until then the following would follow your suggestion for our GPU nodes.  
What do you think?

--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -895,6 +895,7 @@ static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
 void __init initmem_init(void)
 {
 	int nid, cpu;
+	struct device_node *dn;
 
 	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
 	max_pfn = max_low_pfn;
@@ -911,6 +912,18 @@ void __init initmem_init(void)
 	 */
 	nodes_and(node_possible_map, node_possible_map, node_online_map);
 
+	/*
+	 * Consider an ibm,coherent-device-memory node possible. Even though
+	 * it is not online at boot, it may be hotplugged later.
+	 */
+	for_each_compatible_node(dn, NULL, "ibm,coherent-device-memory") {
+		nid = of_node_to_nid_single(dn);
+		if (nid < 0)
+			continue;
+
+		node_set(nid, node_possible_map);
+	}
+
 	for_each_online_node(nid) {
 		unsigned long start_pfn, end_pfn;
 

-- 
Reza Arbab

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-25 02:00 +0200
  Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-05-25 08:30 +0200
    Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-25 15:50 +0200
    Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-05-25 17:20 +0200
      Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-25 17:30 +0200
      Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Balbir Singh <bsingharora@gmail.com> - 2017-05-26 05:50 +0200
      Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-05-26 05:50 +0200
        Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-26 14:40 +0200
        Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-05-26 16:40 +0200
          Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-05-29 07:40 +0200
            Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-31 16:10 +0200
              Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-06-01 11:40 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Reza Arbab <arbab@linux.vnet.ibm.com> - 2017-06-01 23:40 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Balbir Singh <bsingharora@gmail.com> - 2017-06-07 10:10 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-06-07 14:10 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-06-06 11:50 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-06-06 18:20 +0200
                Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Ellerman <mpe@ellerman.id.au> - 2017-06-07 14:10 +0200

csiph-web