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

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 16:42, Anthony Liguori ha scritto: There's such thing as list support in QemuOpts. The only way QemuOptsVisitor was able to implement it was to expose QemuOpts publicly via options_int.h

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

2013-02-28 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 17:19, Eduardo Habkost ha scritto: If it is meant as a prototype only, and the final command-line syntax would be with repeated keys, that's okay. I think that Eduardo/Markus/I are focusing on the user interface, you're focusing

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

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 18:08, Anthony Liguori ha scritto: No, no, no. This makes ':' special, which means you can't have lists of anything containing ':'. Your cure is worse than the disease. Let go of

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

2013-02-28 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: What about: [numa] node=1 cpus=2 cpus=3 qemu -readconfig numa.cfg -numa node=1,cpus=1 I figure you mean

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

2013-02-28 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: Related: overwrite something you got from a config file on the command line. In both your example and mine, we have entirely separate options, and they have perfectly ordinary overwrite semantics: each option overwrites the given keys with the

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

2013-02-28 Thread Paolo Bonzini
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

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

2013-02-28 Thread Paolo Bonzini
Il 28/02/2013 14:41, Anthony Liguori ha scritto: This is certainly ambiguous. Does this mean that you have a single cpu for the node (VCPU 4) or does it mean the node have 4 cpus (presumably ranged 0-3). Given that ambiguity the following: qemu -numa node,nodeid=2,cpus=4,cpus=8

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

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Markus Armbruster arm...@redhat.com writes: Related: overwrite something you got from a config file on the command line. In both your example and mine, we have entirely separate options, and they have perfectly ordinary overwrite semantics:

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

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Markus Armbruster arm...@redhat.com writes: Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: What about: [numa] node=1 cpus=2 cpus=3 qemu -readconfig

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

2013-02-27 Thread Markus Armbruster
Anthony Liguori aligu...@us.ibm.com writes: Paolo Bonzini pbonz...@redhat.com writes: Il 26/02/2013 20:35, Anthony Liguori ha scritto: See also discussion on multi-valued keys in command line option arguments and config files in v1 thread. Hopefully we can reach a conclusion soon,

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

2013-02-27 Thread Anthony Liguori
Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 16:42, Anthony Liguori ha scritto: There's such thing as list support in QemuOpts. The only way QemuOptsVisitor was able to implement it was to expose QemuOpts publicly via options_int.h and rely on a implementation detail. There are

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

2013-02-27 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: Anthony Liguori aligu...@us.ibm.com writes: Which is indistinguishable from a straight string property. This means it's impossible to introspect because the type is context-sensitive. What's more, there is no API outside of QemuOptsVisitor that

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

2013-02-27 Thread Anthony Liguori
Eduardo Habkost ehabk...@redhat.com writes: On Wed, Feb 27, 2013 at 04:57:15PM +0100, Paolo Bonzini wrote: Il 27/02/2013 16:42, Anthony Liguori ha scritto: There's such thing as list support in QemuOpts. The only way QemuOptsVisitor was able to implement it was to expose QemuOpts publicly

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

2013-02-27 Thread Paolo Bonzini
Il 27/02/2013 18:08, Anthony Liguori ha scritto: No, no, no. This makes ':' special, which means you can't have lists of anything containing ':'. Your cure is worse than the disease. Let go of that syntactic high-fructose corn syrup, stick to what we have and works just fine, thank

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

2013-02-27 Thread Eduardo Habkost
On Wed, Feb 27, 2013 at 11:04:08AM -0600, Anthony Liguori wrote: Eduardo Habkost ehabk...@redhat.com writes: On Wed, Feb 27, 2013 at 04:57:15PM +0100, Paolo Bonzini wrote: Il 27/02/2013 16:42, Anthony Liguori ha scritto: There's such thing as list support in QemuOpts. The only way

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

2013-02-27 Thread Eric Blake
On 02/27/2013 10:04 AM, Anthony Liguori wrote: Whatever I use to implement it, I still need to know how the command-line syntax will look like, because we need to tell libvirt developers how they should write the QEMU command-line. Command line syntax is not committed until it appears in a

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

2013-02-27 Thread Anthony Liguori
Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 18:08, Anthony Liguori ha scritto: No, no, no. This makes ':' special, which means you can't have lists of anything containing ':'. Your cure is worse than the disease. Let go of that syntactic high-fructose corn syrup, stick to

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

2013-02-27 Thread Paolo Bonzini
Il 27/02/2013 18:38, Anthony Liguori ha scritto: The solution is there is no way to override a previously specified key. Something like -device virtio-scsi-pci,num_queues=1,num_queues=2 now works, let's make it an error instead. That breaks compatibility. The above may seem silly but

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

2013-02-26 Thread Markus Armbruster
Eduardo Habkost ehabk...@redhat.com writes: This allows : to be used a separator between each CPU range, so the command-line may look like: -numa node,cpus=A-B:C-D Note that the following format, currently used by libvirt: -numa nodes,cpus=A-B,C-D will _not_ work, as , is the option

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

2013-02-26 Thread Eduardo Habkost
On Tue, Feb 26, 2013 at 11:50:08AM +0100, Markus Armbruster wrote: Eduardo Habkost ehabk...@redhat.com writes: This allows : to be used a separator between each CPU range, so the command-line may look like: -numa node,cpus=A-B:C-D Note that the following format, currently used by

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

2013-02-26 Thread Anthony Liguori
Eduardo Habkost ehabk...@redhat.com writes: On Tue, Feb 26, 2013 at 11:50:08AM +0100, Markus Armbruster wrote: Eduardo Habkost ehabk...@redhat.com writes: This allows : to be used a separator between each CPU range, so the command-line may look like: -numa node,cpus=A-B:C-D Note

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

2013-02-26 Thread Eduardo Habkost
On Tue, Feb 26, 2013 at 01:35:14PM -0600, Anthony Liguori wrote: Eduardo Habkost ehabk...@redhat.com writes: On Tue, Feb 26, 2013 at 11:50:08AM +0100, Markus Armbruster wrote: Eduardo Habkost ehabk...@redhat.com writes: This allows : to be used a separator between each CPU range, so

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

2013-02-26 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 26/02/2013 20:35, Anthony Liguori ha scritto: See also discussion on multi-valued keys in command line option arguments and config files in v1 thread. Hopefully we can reach a conclusion soon, and then we'll see whether this patch is what we