qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] NBD handshake may block qemu main thread when socket de


From: Eric Blake
Subject: Re: [Qemu-devel] NBD handshake may block qemu main thread when socket delays or has packet loss
Date: Wed, 4 Jan 2017 14:44:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]