All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, He Chen <he.chen@linux.intel.com>,
	qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@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:45:36 +0000	[thread overview]
Message-ID: <20170310164536.GO32264@redhat.com> (raw)
In-Reply-To: <20170310184025-mutt-send-email-mst@kernel.org>

On Fri, Mar 10, 2017 at 06:40:52PM +0200, Michael S. Tsirkin wrote:
> On Fri, Mar 10, 2017 at 04:38:59PM +0000, Daniel P. Berrange wrote:
> > 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.
> 
> AFAIK the distance is assumed to be symmetrical, src/dst seems
> to imply asymmetry.

No, the distance needs to be asymmetrical - see discussions under previous
postings of this patch.

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:45 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
2017-03-10 16:40     ` Michael S. Tsirkin
2017-03-10 16:45       ` Daniel P. Berrange [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=20170310164536.GO32264@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.