[libvirt] [PATCH 2/2] qemu: use -incoming fd:n to avoid qemu holding fd indefinitely

Eric Blake eblake at redhat.com
Thu Dec 23 16:51:53 UTC 2010


On 12/23/2010 09:34 AM, Eric Blake wrote:
>> Since you are at it, you may also want to replace the usage of netcat
>> and Unix sockets with "-incoming fd:" and a one-way pipe.
> 
> Not sure it's worth it.  Is unix:path any less efficient than creating a
> one-way pipe for use by fd:n?  Also, we can't replace netcat; the use of
> '-incoming "exec:nc -lU path"' is only used in libvirt that predates
> '-incoming unix:path', which also happens to predate '-incoming fd:n'.

Thinking about it more:

In the outgoing direction, we still have to use a unix socket (outgoing
migration is started via a monitor command, and I don't know how to pass
a new fd into qemu for using with an fd:n outgoing migration via the
monitor - it seems like fd is only useful on the command line).

But you are right that in the incoming direction, we could use
virFDStreamOpen rather than virFDStreamConnectUNIX, since a one-way pipe
is a lot less code to set up than a unix socket; and this could fall
back to '-incoming stdio' on older qemu with no loss over the current
fallback of '-incoming "exec:nc -lU path"'.  I'll play with a patch to
see how it looks.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101223/6611e129/attachment-0001.sig>


More information about the libvir-list mailing list