qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 04/14] NUMA: convert -numa option to use Opt


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 04/14] NUMA: convert -numa option to use OptsVisitor
Date: Wed, 11 Dec 2013 22:35:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 11/12/2013 19:51, Eric Blake ha scritto:
>> > +{ 'union': 'NumaOptions',
>> > +  'data': {
>> > +    'node': 'NumaNodeOptions' }}
> Why do we need a union, if there's no alternative, and since nothing
> else in the series adds an alternative?

Because these structures are used to parse command-line options and
follow somewhat special rules.  The "node" in "-numa node,..." is
present for forwards-extensibility.  Another alternative, "mem", was
added in previous versions of the NUMA policy patches but is made
obsolete by Igor's memory object.

>> > +
>> > +##
>> > +# @NumaNodeOptions
>> > +#
>> > +# Create a guest NUMA node. (for OptsVisitor)
>> > +#
>> > +# @nodeid: #optional NUMA node ID
>> > +#
>> > +# @cpus: #optional VCPUs belong to this node
> What are the defaults if these fields are omitted?

Wanlong, can you fill this out when you resubmit?

>> > +#
>> > +# @mem: #optional memory size of this node
> In bytes?  Why is this field a string instead of an integer?

It was like this because it is a command-line option and thus is never
used via QMP.  However, it can and should indeed be a 'size', handled
like Igor did for '-m mem=' in patch 8 of the series.

Paolo

>> > +#
>> > +# Since: 2.0
>> > +##
>> > +{ 'type': 'NumaNodeOptions',
>> > +  'data': {
>> > +   '*nodeid': 'uint16',
>> > +   '*cpus':   ['uint16'],
>> > +   '*mem':    'str' }}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]