[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 11/12] nbd: switch to asynchronous operation

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 11/12] nbd: switch to asynchronous operation
Date: Fri, 09 Sep 2011 17:34:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 09/09/2011 05:03 PM, Paolo Bonzini wrote:

I'm a bit unsure here, actually. So you lock a mutex, send a request,
wait for a response, then unlock the mutex. Surely this code doesn't
allow more than one request to be in flight at a time?

No, it doesn't.  It shouldn't be hard to do it though. You could have
two mutexes, one for sending and one for receiving.  You yield after
sending, and let nbd_coroutine_restart read the reply.  It can then
reenter that reply's coroutine based on the handle in the reply.  I
still prefer to do it in a separate patch.

There is a problem with discard requests because they are not coroutine based (yet). But it would be the same even in your AIO implementation, unfortunately.


reply via email to

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