qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Eduardo Habkost <ehabkost@redhat.com>,
	anton@samba.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH] ppc/spapr: support sparse NUMA node numbering
Date: Mon, 23 Jun 2014 18:08:34 -0700	[thread overview]
Message-ID: <20140624010833.GF4323@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140624004825.GE4323@linux.vnet.ibm.com>

With generic sparse NUMA node parsing in place ("numa: enable sparse
node numbering"), ppc can be updated to iterate over only the
user-specified nodes.

qemu-system-ppc64 -machine pseries,accel=kvm,usb=off -m 4096
-realtime mlock=off -numa node,nodeid=3 -numa node,nodeid=2 -smp 4

Before:

info numa:
node 0 cpus: 0 2
node 0 size: 2048 MB
node 1 cpus: 1 3
node 1 size: 2048 MB

numactl --hardware:
available: 2 nodes (0-1)
node 0 cpus: 0 2
node 0 size: 2027 MB
node 0 free: 1875 MB
node 1 cpus: 1 3
node 1 size: 2045 MB
node 1 free: 1980 MB
node distances:
node   0   1
  0:  10  40
  1:  40  10

After:

info numa:
node 2 cpus: 0 2
node 2 size: 2048 MB
node 3 cpus: 1 3
node 3 size: 2048 MB

numactl --hardware:
available: 3 nodes (0,2-3)
node 0 cpus:
node 0 size: 0 MB
node 0 free: 0 MB
node 2 cpus: 0 2
node 2 size: 2027 MB
node 2 free: 1943 MB
node 3 cpus: 1 3
node 3 size: 2045 MB
node 3 free: 1904 MB
node distances:
node   0   2   3
  0:  10  40  40
  2:  40  10  40
  3:  40  40  10

Note, the empty node 0 is due to the Linux kernel.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 82f183f..d07857a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -707,7 +707,10 @@ static int spapr_populate_memory(sPAPREnvironment *spapr, void *fdt)
 
     /* RAM: Node 1 and beyond */
     mem_start = node0_size;
-    for (i = 1; i < nb_numa_nodes; i++) {
+    for (i = 1; i < max_numa_node; i++) {
+        if (!numa_info[i].present) {
+            continue;
+        }
         mem_reg_property[0] = cpu_to_be64(mem_start);
         if (mem_start >= ram_size) {
             node_size = 0;

  reply	other threads:[~2014-06-24  1:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 19:33 [Qemu-devel] [RFC PATCH] numa: enable sparse node numbering Nishanth Aravamudan
2014-06-24  0:48 ` [Qemu-devel] [RFC PATCH v2] " Nishanth Aravamudan
2014-06-24  1:08   ` Nishanth Aravamudan [this message]
2014-06-24  3:34     ` [Qemu-devel] [RFC PATCH] ppc/spapr: support sparse NUMA " Nishanth Aravamudan
2014-06-24  7:43   ` [Qemu-devel] [RFC PATCH v2] numa: enable sparse " Hu Tao
2014-06-24 17:40   ` [Qemu-devel] [RFC PATCH v3] " Nishanth Aravamudan
2014-06-25 11:21     ` Igor Mammedov
2014-06-25 16:13       ` Nishanth Aravamudan
2014-06-25 16:52         ` Eduardo Habkost
2014-06-25 17:04           ` Nishanth Aravamudan
2014-06-25 18:24             ` Michael S. Tsirkin
2014-06-26  6:29             ` Igor Mammedov
2014-06-25 18:23           ` Michael S. Tsirkin
2014-06-26  9:09             ` Hu Tao
2014-06-26 17:58               ` Nishanth Aravamudan
2014-06-26 18:39                 ` Eduardo Habkost
2014-06-26 19:37     ` Eduardo Habkost
2014-06-30 18:26       ` Nishanth Aravamudan
2014-06-30 21:48         ` Eduardo Habkost
2014-06-24  7:33 ` [Qemu-devel] [RFC PATCH] " Igor Mammedov
2014-06-24  8:58   ` Alexey Kardashevskiy
2014-06-24 16:39   ` Nishanth Aravamudan

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=20140624010833.GF4323@linux.vnet.ibm.com \
    --to=nacc@linux.vnet.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=anton@samba.org \
    --cc=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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).