On 01/04/2017 02:45 AM, Fangyi (C) wrote: > As we all know, socket is in blocking mode when nbd is negotiating > with the other end. If the network is poor because of delay or packet > loss, socket read or write will return very slowly. The mainloop events > won't be handled in time util nbd handshake ends.
I wonder if Paolo's work to improve NBD coroutine usage after handshakes can be leveraged here? https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03224.html > > Any advices to solve the problem? At any rate, it sounds like someone will have to patch NBD code to use coroutines instead of blocking for the handshake portion (and that's true in general - ANY operation that can block should probably be refactored into aio or coroutines so that the main loop can remain responsive). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature