On Wed, Jan 05, 2011 at 09:57:42AM -0500, Laine Stump wrote:
On 01/05/2011 05:19 AM, Daniel P. Berrange wrote:
>
>We should try to keep terminology matching the disk<driver>
>so I think
>
> <driver name='qemu|vhost'/>
>
>with omission of<driver> resulting in us automatically
>adding either 'qemu' or 'vhost' to the XML. We don't
>want to have an explicit 'default' value in the XML,
>because users should be able to see the guest is running
>with.
Do you mean to add it to the XML that's saved in the config? If so,
that would mean that it would only be possible to configure it as
"use whatever is best for the current situation" for the first
startup of the domain. Once that happened, it would be stuck on
whichever was used the first time (qemu or vhost), so if the domain
was first started when vhost-net was loaded, then later restarted
when vhost-net wasn't loaded (or maybe migrated to another host that
didn't have vhost support), it would fail to start.
Yes, I *did* actually mean to set it in the permanent XML
config, so once a choice is made, that choice is preserved
thereafter. This gives us better reliability in the future
if a further possible 'default' options are introduced and
we want to avoid existing guests accidentally getting the
new option for some reason.
Aside from that, I'd been thinking that the "backend"
driver in this
case is virtio, not qemu or vhost; qemu(userland) vs vhost seems
like just a setting within that driver. So it doesn't seem
appropriate to me to have the name decide whether to use userland or
vhost.
Hmm, I thought vhost was a property of any tap device based
backend, rather than virtio ?
One other twist - there's already another request for something else
to be set for each network device: sndbuf.
<
https://bugzilla.redhat.com/show_bug.cgi?id=665293>
https://bugzilla.redhat.com/show_bug.cgi?id=665293
<
https://bugzilla.redhat.com/show_bug.cgi?id=665293>
The sndbuf setting is applicable to any network device that connects
to the real world using a tap device (ie, not just virtio). If we
want to add that setting via the same scheme, we would need
something like:
<driver name='qemu|vhost' sndbuf='0'/>
(0 can't be the default, because 0 is actually one of the settings
that they want to explicitly specify (if sndbuf isn't given on the
commandline, qemu defaults to 1048576).
sndbuf is much more like a true "tunable" than vhost is, so
I think it makes sense to have a generic representation for
NIC tunables.
Daniel