linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: Reza Arbab <arbab@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: Michael Bringmann <mwb@linux.vnet.ibm.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>
Subject: Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc
Date: Wed, 07 Jun 2017 18:06:17 +1000	[thread overview]
Message-ID: <1496822777.18257.6.camel@gmail.com> (raw)
In-Reply-To: <20170601213310.uzal6zihfbxazysx@arbab-laptop.localdomain>

On Thu, 2017-06-01 at 16:33 -0500, Reza Arbab wrote:
> 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);
> +	}
> +

I think it looks reasonable, although I'd really like to set a limit
in firmware on the number of nodes and fix memcg hotplug correctly in
the medium term.

Balbir Singh.

>  	for_each_online_node(nid) {
>  		unsigned long start_pfn, end_pfn;
>  
> 

  reply	other threads:[~2017-06-07  8:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 15:15 [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc Michael Bringmann
2017-05-23 15:52 ` Reza Arbab
2017-05-23 20:05   ` Michael Bringmann
2017-05-23 21:49     ` Reza Arbab
2017-05-23 22:41       ` Michael Bringmann
2017-05-23 22:44       ` Michael Bringmann
2017-05-24 11:19         ` Michael Ellerman
2017-05-24 23:55           ` Michael Bringmann
2017-05-25  6:19             ` Michael Ellerman
2017-05-25 13:40               ` Michael Bringmann
2017-05-25 15:10               ` Reza Arbab
2017-05-25 15:26                 ` Michael Bringmann
2017-05-26  3:46                 ` Balbir Singh
2017-05-26  3:46                 ` Michael Ellerman
2017-05-26 12:31                   ` Michael Bringmann
2017-05-26 14:31                   ` Reza Arbab
2017-05-29  5:32                     ` Michael Ellerman
2017-05-31 14:05                       ` Michael Bringmann
2017-06-01  9:36                         ` Michael Ellerman
2017-06-01 21:33                           ` Reza Arbab
2017-06-07  8:06                             ` Balbir Singh [this message]
2017-06-07 12:07                             ` Michael Ellerman
2017-06-02  5:24                           ` Michael Bringmann
2017-06-06  9:48                             ` Michael Ellerman
2017-06-06 16:16                               ` Michael Bringmann
2017-06-07 12:08                                 ` Michael Ellerman
2017-06-07 17:28                                   ` RESEND " Michael Bringmann
2017-06-13 10:45                                     ` Michael Ellerman
2017-06-13 22:21                                       ` Michael Bringmann
2017-06-14  5:25                                         ` Balbir Singh
2017-06-14  5:27                                           ` Balbir Singh
2017-06-14 13:41                                             ` Michael Bringmann
2017-06-07 17:17                                 ` Michael Bringmann
2017-05-24 14:36         ` Reza Arbab
2017-05-24 23:41           ` Michael Bringmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496822777.18257.6.camel@gmail.com \
    --to=bsingharora@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=arbab@linux.vnet.ibm.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=mwb@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=shailendras@nvidia.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).