From: Eric Blake <eblake@redhat.com>
To: Andrew Jones <drjones@redhat.com>, He Chen <he.chen@linux.intel.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes
Date: Mon, 3 Apr 2017 13:58:34 -0500 [thread overview]
Message-ID: <3d69719c-914e-0538-e816-7a613a6af95e@redhat.com> (raw)
In-Reply-To: <20170403083851.u6f7ktakdqtmzwhj@kamzik.brq.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2671 bytes --]
On 04/03/2017 03:38 AM, Andrew Jones wrote:
> On Sat, Apr 01, 2017 at 06:25:26PM +0800, 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.
>>
>> +++ b/qapi-schema.json
>> @@ -5644,10 +5644,14 @@
>> ##
>> # @NumaOptionsType:
>> #
>> +# @node: NUMA nodes configuration
>> +#
>> +# @dist: NUMA distance configuration
>> +#
Missing a '(since 2.10)' tag on @dist.
>> ##
>> +# @NumaDistOptions:
>> +#
>> +# Set the distance between 2 NUMA nodes.
>> +#
>> +# @src: source NUMA node.
>> +#
>> +# @dst: destination NUMA node.
>> +#
>> +# @val: NUMA distance from source node to destination node.
Missing mention of the magic of 255.
>> +#
>> +# Since: 2.10
>> +##
>> +{ 'struct': 'NumaDistOptions',
>> + 'data': {
>> + 'src': 'uint16',
>> + 'dst': 'uint16',
>> + 'val': 'uint8' }}
>> +
Is a user allowed to pass { "src":0, "dst":0, "val":11 }, or do you
hard-validate that the diagonal of the matrix is always 10 (the user can
omit it, but if specified it must be 10). Do you enforce that no
distance is less than 10?
>> +@var{source} and @var{destination} are NUMA node IDs.
>> +@var{distance} is the NUMA distance from @var{source} to @var{destination}.
>> +The distance from node A to node B may be different from the distance from
>> +node B to node A as the distance can to be asymmetrical. If a node is
>> +unreachable, set 255 as distance.
>
> The distance from a node to itself is always 10. If no distance values
> are given for node pairs, then the default distance of 20 is used for each
> pair. If any pair of nodes is given a distance, then all pairs must be
> given distances. Although, when distances are only given in one direction
> for each pair of nodes, then the distances in the opposite directions are
> assumed to be the same. If, however, an asymmetrical pair of distances is
> given for even one node pair, then all node pairs must be provided
> distance values for both directions, even when they are symmetrical. When
> a node is unreachable from another node, set the pair's distance to 255.
I don't like duplication where it is not necessary, but don't know if
there's an easy way to make the .json file and qemu-options.hx refer to
one another, since they both feed separate user-visible documentation.
So you may have to repeat some of this in the .json file (such as my
mention above that at least documenting that 255 is special).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-04-03 18:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-01 10:25 [Qemu-devel] [PATCH v4] Allow setting NUMA distance for different NUMA nodes He Chen
2017-04-02 15:42 ` no-reply
2017-04-03 8:38 ` Andrew Jones
2017-04-03 18:58 ` Eric Blake [this message]
2017-04-05 10:17 ` He Chen
2017-04-05 10:03 ` He Chen
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=3d69719c-914e-0538-e816-7a613a6af95e@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=drjones@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).