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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]