|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 11/12] nbd: switch to asynchronous operation |
Date: | Fri, 09 Sep 2011 17:03:02 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 09/09/2011 04:52 PM, Nicholas Thomas 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.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |