|
From: | Anthony Liguori |
Subject: | [Qemu-devel] Re: [patch uq/master 1/2] virtio-pci: wake up iothread on VIRTIO_PCI_QUEUE_NOTIFY |
Date: | Mon, 22 Feb 2010 09:29:15 -0600 |
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 02/22/2010 09:16 AM, Marcelo Tosatti wrote:
Are you concerned about spurious wakeups?Yes. Also, qemu_notify_event() is an undirected notification (wakes up all iothreads, and all devices), whereas ->handle_output() is directed (wakes up exactly what is needed). What's the underlying problem? A new input buffer has become available, and we need to re-poll the incoming file descriptor? If so, that's best done from ->handle_output() (either by waking the iothread or calling read() itself and perhaps receiving -EAGAIN).Yes. Sure, perhaps calling read() itself is appropriate, and i see your point that>handle_output contains more context for a smarter decision. But one can argue thats an improvement on top of a dumb wakeup.
Spurious calls to qemu_notify_event() also make it difficult to tell when it's actually necessary to call qemu_notify_event() vs. when it's just something that doesn't hurt.
Regards, Anthony Liguori
-- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to address@hidden More majordomo info at http://vger.kernel.org/majordomo-info.html
[Prev in Thread] | Current Thread | [Next in Thread] |