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

Path csiph.com!news.freedyn.net!open-news-network.org!aioe.org!bofh.it!news.nic.it!robomod
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 Thu, 01 Jun 2017 23:40:01 +0200
Message-ID <tNFYZ-8b0-3@gated-at.bofh.it> (permalink)
References <tKqMO-1ta-17@gated-at.bofh.it> <tKCEi-1Hm-9@gated-at.bofh.it> <tKOm6-tO-9@gated-at.bofh.it> <tKUrw-4D7-5@gated-at.bofh.it> <tL2Ip-1qK-3@gated-at.bofh.it> <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>
X-Original-To Michael Ellerman <mpe@ellerman.id.au>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
Organization IBM Linux Technology Center
User-Agent NeoMutt/20170428 (1.8.2)
X-Tm-As-Gconf 00
X-Cbid 17060121-0020-0000-0000-00000C121762
X-Ibm-Spammodules-Versions BY=3.00007155; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00868809; UDB=6.00431827; IPR=6.00648721; BA=6.00005393; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015673; XFM=3.00000015; UTC=2017-06-01 21:33:15
X-Ibm-Av-Detection SAVI=unused REMOTE=unused XFE=unused
X-Cbparentid 17060121-0021-0000-0000-00005C9901C9
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:,, definitions=2017-06-01_05:,, signatures=0
X-Proofpoint-Spam-Details rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706010397
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 47
X-Original-Cc Michael Bringmann <mwb@linux.vnet.ibm.com>, Balbir Singh <bsingharora@gmail.com>, linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>, Bharata B Rao <bharata@linux.vnet.ibm.com>, Shailendra Singh <shailendras@nvidia.com>, Thomas Gleixner <tglx@linutronix.de>, linuxppc-dev@lists.ozlabs.org, Sebastian Andrzej Siewior <bigeasy@linutronix.de>
X-Original-Date Thu, 1 Jun 2017 16:33:10 -0500
X-Original-Message-ID <20170601213310.uzal6zihfbxazysx@arbab-laptop.localdomain>
X-Original-References <ee96df3d-ad0f-c4dc-e7d5-290018ec8afd@linux.vnet.ibm.com> <87poeya4dt.fsf@concordia.ellerman.id.au> <8e2417d8-d108-2949-40f2-997d53a3f367@linux.vnet.ibm.com> <87a861a25y.fsf@concordia.ellerman.id.au> <20170525151011.m4ae4ipxbqsj3mn7@arbab-laptop.localdomain> <87zie08ekt.fsf@concordia.ellerman.id.au> <20170526143147.z4lmtrs7vowucbkf@arbab-laptop.localdomain> <87lgpg6xe2.fsf@concordia.ellerman.id.au> <54877b2b-8446-20f6-e316-25af809ae11f@linux.vnet.ibm.com> <87tw402go0.fsf@concordia.ellerman.id.au>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1655778

Show key headers only | 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 | Next — Previous 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