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: Wed, 28 Apr 2010 08:25:59 -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/28/2010 02:29 AM, Amit Shah wrote:
On (Tue) Apr 27 2010 [12:41:27], 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.
When the guest indicates it has added buffers to the vq, the iothread
can then start consuming them. Without this notification, the iothread
only polls for free buffers when it times out or gets woken up
otherwise.

When you say, polls for free buffers, what do you mean by that?

You mean, there's a can_read() somewhere that checks for free buffers?

I think switching to qemu_set_fd_handler() would be a better solution.

Regards,

Anthony Liguori

Other virtio devices do it similarly as well.

                Amit





reply via email to

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