qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: He Chen <he.chen@linux.intel.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] x86: Allow to set NUMA distance for different NUMA nodes
Date: Fri, 10 Mar 2017 16:38:59 +0000	[thread overview]
Message-ID: <20170310163859.GN32264@redhat.com> (raw)
In-Reply-To: <89688700-069c-1700-b226-0c1e81203c76@redhat.com>

On Fri, Mar 10, 2017 at 10:37:08AM -0600, Eric Blake wrote:
> On 03/10/2017 04:18 AM, He Chen wrote:
> > Current, QEMU does not provide a clear command to set vNUMA distance for
> > guest although we already have `-numa` command to set vNUMA nodes.
> > 
> 
> > 
> > This patch is going to add SLIT table support in QEMU, and provides
> > addtional option `dist` for command `-numa` to allow user set vNUMA
> 
> s/addtional/additional/
> 
> > distance by QEMU command.
> > 
> > With this patch, when a user wants to create a guest that contains
> > several vNUMA nodes and also wants to set distance among those nodes,
> > the QEMU command would like:
> > 
> > ```
> > -object memory-backend-ram,size=1G,prealloc=yes,host-nodes=0,policy=bind,id=node0 \
> > -numa node,nodeid=0,cpus=0,memdev=node0 \
> > -object memory-backend-ram,size=1G,prealloc=yes,host-nodes=1,policy=bind,id=node1 \
> > -numa node,nodeid=1,cpus=1,memdev=node1 \
> > -object memory-backend-ram,size=1G,prealloc=yes,host-nodes=2,policy=bind,id=node2 \
> > -numa node,nodeid=2,cpus=2,memdev=node2 \
> > -object memory-backend-ram,size=1G,prealloc=yes,host-nodes=3,policy=bind,id=node3 \
> > -numa node,nodeid=3,cpus=3,memdev=node3 \
> > -numa dist,a=0,b=1,val=21 \
> > -numa dist,a=0,b=2,val=31 \
> > -numa dist,a=0,b=3,val=41 \
> > -numa dist,a=1,b=0,val=21 \
> > ...
> > ```
> 
> 
> > +++ b/qapi-schema.json
> > @@ -5647,7 +5647,7 @@
> >  # Since: 2.1
> >  ##
> >  { 'enum': 'NumaOptionsType',
> > -  'data': [ 'node' ] }
> > +  'data': [ 'node', 'dist' ] }
> 
> Missing documentation, including the fact that 'dist' is added in 2.10
> (you've missed 2.9).
> 
> >  
> >  ##
> > +# @NumaDistOptions:
> > +#
> > +# Set distance between 2 NUMA nodes. (for OptsVisitor)
> > +#
> > +# @a: first NUMA node.
> > +#
> > +# @b: second NUMA node.
> > +#
> > +# @val: NUMA distance between 2 given NUMA nodes.
> > +#
> > +# Since: 2.9
> 
> This is a new feature, but you've missed soft freeze; this will have to
> be 2.10.
> 
> > +##
> > +{ 'struct': 'NumaDistOptions',
> > +  'data': {
> > +   'a':   'uint8',
> > +   'b':   'uint8',
> > +   'val': 'uint8' }}
> 
> Using uint8 limits us to at most 256 numa nodes. Is that going to bite
> us in the future?
> 
> Is 'a' and 'b' really the best naming convention to use (it's concise,
> but maybe 'first' and 'second', or 'source' and 'destination' is better)?

'src' and 'dst' are probably a reasnoable compromise between meaningful
and short.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

  reply	other threads:[~2017-03-10 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10 10:18 [Qemu-devel] [PATCH] x86: Allow to set NUMA distance for different NUMA nodes He Chen
2017-03-10 16:34 ` Michael S. Tsirkin
2017-03-10 16:37 ` Eric Blake
2017-03-10 16:38   ` Daniel P. Berrange [this message]
2017-03-10 16:40     ` Michael S. Tsirkin
2017-03-10 16:45       ` Daniel P. Berrange

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=20170310163859.GN32264@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=he.chen@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).