linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org,
	Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>,
	David Rientjes <rientjes@google.com>
Subject: Re: [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map
Date: Thu, 5 Mar 2015 15:27:31 -0800	[thread overview]
Message-ID: <20150305232731.GF30570@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150305221308.GG23912@htj.duckdns.org>

On 05.03.2015 [17:13:08 -0500], Tejun Heo wrote:
> On Thu, Mar 05, 2015 at 10:05:49AM -0800, Nishanth Aravamudan wrote:
> > While looking at this, I noticed that nr_node_ids is actually a
> > misnomer, it seems. It's not the number, but the maximum_node_id, as
> > with sparse NUMA nodes, you might only have two NUMA nodes possible, but
> > to make certain loops work, nr_node_ids will be, e.g., 17. Should it be
> > changed?
> 
> It's the same for nr_cpu_ids.  It's counting the number of valid IDs
> during that boot instance.  In the above case, whether the nodes are
> sparse or not, there exist 17 node ids - 0 to 16.  Maybe numa_max_id
> had been a better name (but would that equal the highest number or
> +1?) but nr_node_ids != nr_nodes so I don't think it's a misnomer
> either.  Doesn't really matter at this point.  Maybe add comments on
> top of both?

Yes, I will consider that. To me, I guess it's more a matter of:

a) How does nr_node_ids relate to the number of possible NUMA node IDs
at runtime?

They are identical.

b) How does nr_node_ids relate to the number of NUMA node IDs in use?

There is no relation.

c) How does nr_node_ids relate to the maximum NUMA node ID in use?

It is one larger than that value.

However, for a), at least, we don't care about that on power, really. We
don't have node hotplug, so the "possible" is the "online" in practice,
for a given system.

Iteration seems to generally not be a problem (since we have sparse
iterators anyways) and we shouldn't be allocating for non-present nodes.

But we run into excessive allocations (I'm looking into a few others
Dipankar has found now) with array allocations based of nr_node_ids or
MAX_NUMNODES when the NUMA topology is sparse..

-Nish

      reply	other threads:[~2015-03-05 23:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 18:05 [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map Nishanth Aravamudan
2015-03-05 21:16 ` David Rientjes
2015-03-05 21:48   ` Michael Ellerman
2015-03-05 21:58     ` David Rientjes
2015-03-05 22:08       ` Tejun Heo
2015-03-05 22:18         ` Tejun Heo
2015-03-05 23:21         ` Nishanth Aravamudan
2015-03-05 23:24           ` Tejun Heo
2015-03-05 23:20       ` Nishanth Aravamudan
2015-03-05 23:17     ` Nishanth Aravamudan
2015-03-05 23:15   ` Nishanth Aravamudan
2015-03-05 23:29     ` David Rientjes
2015-03-06  5:27       ` [PATCH v2] powerpc/numa: set node_possible_map to only node_online_map during boot Nishanth Aravamudan
2015-03-06 11:29         ` Raghavendra K T
2015-03-09 23:55         ` Michael Ellerman
2015-03-10 23:50           ` [PATCH v3] " Nishanth Aravamudan
2015-03-05 22:13 ` [RFC PATCH] powerpc/numa: reset node_possible_map to only node_online_map Tejun Heo
2015-03-05 23:27   ` Nishanth Aravamudan [this message]

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=20150305232731.GF30570@linux.vnet.ibm.com \
    --to=nacc@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=raghavendra.kt@linux.vnet.ibm.com \
    --cc=rientjes@google.com \
    --cc=tj@kernel.org \
    /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).