qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread up


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH v6 18/18] virtio-serial-bus: wake up iothread upon guest read notification
Date: Tue, 27 Apr 2010 13:13:29 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

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<address@hidden>

Wake up iothread when buffers are consumed.

Signed-off-by: Marcelo Tosatti<address@hidden>
Signed-off-by: Amit Shah<address@hidden>
What's the race here?  This looks very odd to me.
We discussed this on the following thread:

http://www.mail-archive.com/address@hidden/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






reply via email to

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