On 04/27/2010 12:58 PM, Marcelo Tosatti wrote:
On Tue, Apr 27, 2010 at 12:41:27PM -0500, Anthony Liguori wrote:
On 04/27/2010 07:34 AM, Amit Shah wrote:
From: Marcelo Tosatti<mtosa...@redhat.com>
Wake up iothread when buffers are consumed.
Signed-off-by: Marcelo Tosatti<mtosa...@redhat.com>
Signed-off-by: Amit Shah<amit.s...@redhat.com>
What's the race here? This looks very odd to me.
We discussed this on the following thread:
http://www.mail-archive.com/k...@vger.kernel.org/msg29249.html
I don't think there was ever an adequate explanation of exactly what was
happening.
My suspicion is that the real problem is due to the can_read() handlers
whereas it's necessary to invoke the main loop for can_read() to be
executed again to cause the event to be polled. The better solution
though is to not use the can_read() handler and instead explicitly
register and deregister the read callbacks.
qemu_set_fd_handler() would require a notify call but that makes sense.
I think this is a good justification for removing uses of
qemu_set_fd_handler2().
Regards,
Anthony Liguori