qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: qemu-devel@nongnu.org
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>,
	qemu-ppc@nongnu.org, groug@kaod.org, david@gibson.dropbear.id.au
Subject: [RESEND PATCH v3 0/5] pSeries FORM2 affinity support
Date: Wed, 25 Aug 2021 11:39:38 -0300	[thread overview]
Message-ID: <20210825143943.529733-1-danielhb413@gmail.com> (raw)

Hi,

This is a repost of RFCv3 [1] rebased using current David's ppc-for-6.2.

The reason of this repost is that the kernel side changes got accepted
in the maintainer's tree [2], meaning that this series is now an implementation
of the future FORM2 kernel support in the pseries kernel.

In a POWER9 host with Annesh's patches from [2] and a QEMU with this
series, and a guest with the following NUMA distances:

(...)
-object memory-backend-ram,id=mem0,size=4G -numa node,memdev=mem0,cpus=0-1,nodeid=0 \
-object memory-backend-ram,id=mem1,size=4G -numa node,memdev=mem1,cpus=2-3,nodeid=1 \
-object memory-backend-ram,id=mem2,size=4G -numa node,memdev=mem2,cpus=4-5,nodeid=2 \
-object memory-backend-ram,id=mem3,size=2G -numa node,memdev=mem3,cpus=6-7,nodeid=3 \
-numa node,nodeid=4 \
-numa dist,src=0,dst=1,val=22 -numa dist,src=0,dst=2,val=22 \
-numa dist,src=0,dst=3,val=22 -numa dist,src=0,dst=4,val=22 \
-numa dist,src=1,dst=0,val=44 -numa dist,src=1,dst=2,val=44 \
-numa dist,src=1,dst=3,val=44 -numa dist,src=1,dst=4,val=44 \
-numa dist,src=2,dst=0,val=66 -numa dist,src=2,dst=1,val=66 \
-numa dist,src=2,dst=3,val=66 -numa dist,src=2,dst=4,val=66 \
-numa dist,src=3,dst=0,val=88 -numa dist,src=3,dst=1,val=88 \
-numa dist,src=3,dst=2,val=88 -numa dist,src=3,dst=4,val=88


This is the output of 'numactl -H' in the guest:

# numactl -H                                                                                       
available: 4 nodes (0-3)                                                                                             
node 0 cpus: 0 1                                        
node 0 size: 3987 MB                                                                   
node 0 free: 3362 MB                       
node 1 cpus: 2 3                                 
node 1 size: 4090 MB                                    
node 1 free: 4071 MB                                 
node 2 cpus: 4 5                                      
node 2 size: 4090 MB                      
node 2 free: 4075 MB                      
node 3 cpus: 6 7                       
node 3 size: 2027 MB                                                                                                 
node 3 free: 2010 MB                                                                                                 
node distances:                                                                                                      
node   0   1   2   3                                                                                                 
  0:  10  22  22  22
  1:  44  10  44  44
  2:  66  66  10  66
  3:  88  88  88  10


We're now able to set asynchronous distances between nodes while also
not being constrained to any fixed values (10, 20, 40, 80 ...) like we
currently are when using FORM1.


[1] https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg03622.html
[2] https://lore.kernel.org/linuxppc-dev/20210812132223.225214-1-aneesh.kumar@linux.ibm.com/


Daniel Henrique Barboza (5):
  spapr_numa.c: split FORM1 code into helpers
  spapr: move NUMA data init to post-CAS
  spapr_numa.c: base FORM2 NUMA affinity support
  spapr: simplify spapr_numa_associativity_init params
  spapr: move memory/cpu less check to spapr_numa_FORM1_affinity_init()

 hw/ppc/spapr.c              |  60 ++++------
 hw/ppc/spapr_hcall.c        |   4 +
 hw/ppc/spapr_numa.c         | 224 +++++++++++++++++++++++++++++++++---
 include/hw/ppc/spapr.h      |   1 +
 include/hw/ppc/spapr_numa.h |   3 +-
 include/hw/ppc/spapr_ovec.h |   1 +
 6 files changed, 236 insertions(+), 57 deletions(-)

-- 
2.31.1



             reply	other threads:[~2021-08-25 14:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 14:39 Daniel Henrique Barboza [this message]
2021-08-25 14:39 ` [RESEND PATCH v3 1/5] spapr_numa.c: split FORM1 code into helpers Daniel Henrique Barboza
2021-08-25 15:49   ` Greg Kurz
2021-08-25 14:39 ` [RESEND PATCH v3 2/5] spapr: move NUMA data init to post-CAS Daniel Henrique Barboza
2021-08-25 16:46   ` Greg Kurz
2021-08-25 14:39 ` [RESEND PATCH v3 3/5] spapr_numa.c: base FORM2 NUMA affinity support Daniel Henrique Barboza
2021-08-25 14:39 ` [RESEND PATCH v3 4/5] spapr: simplify spapr_numa_associativity_init params Daniel Henrique Barboza
2021-08-25 14:39 ` [RESEND PATCH v3 5/5] spapr: move memory/cpu less check to spapr_numa_FORM1_affinity_init() Daniel Henrique Barboza

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=20210825143943.529733-1-danielhb413@gmail.com \
    --to=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).