qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa o


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option
Date: Thu, 28 Feb 2013 16:05:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 28/02/2013 14:32, Anthony Liguori ha scritto:
>>> >> qemu -numa
>>> >> node=1,cpus=0,cpus=1,cpus=2,cpus=3,cpus=8,cpus=9,cpus=10,cpus=11
>> >
>> > Let me pick up the baby you just threw out with the bathwater for you:
>> >
>> >     qemu -numa node,nodeid=1,cpus=0-3,cpus=8-11
> If you're okay with making '-' be special syntax, why are you not okay
> with ':' being special syntax?

For example because another kind of string list could have a colon
inside, and that would in turn need escaping (in fact that's already the
case for guestfwd); repeating the key is a syntax that is easily
reusable (and indeed is already in use).  Instead, the '-' is parsed
within the NUMA code, and is completely opaque to QemuOpts.  The NUMA
code knows that the '-' will never need escaping, because it only deals
with positive integers.

A perhaps better question would have been "if you're okay with making
',' be special syntax, why not ':'".  And the answer is that indeed ','
already brings some problems, but likely they outweight the advantages
of having say only a "-set" option.  But adding a second escaped
character is already much more debatable in my opinion.

> What I assume your proposing is making cpus be a string list and then
> parsing within the NUMA code.  Why not do it all in QemuOpts core code?

What would the QemuOpts parsing code do?  Do you have in mind bitmasks
as a first-class QemuOpts type?  If so, that would be an argument in
favor of ':', but against the prototype patch you posted yesterday.

Paolo



reply via email to

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