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 majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html