[libvirt] [PATCH 10/15] Fully asynchronous monitor I/O processing
Daniel Veillard
veillard at redhat.com
Wed Nov 4 17:14:18 UTC 2009
On Tue, Nov 03, 2009 at 02:50:04PM -0500, Daniel P. Berrange wrote:
> Change the QEMU monitor file handle watch to poll for both
> read & write events, as well as EOF. All I/O to/from the
> QEMU monitor FD is now done in the event callback thread.
>
> When the QEMU driver needs to send a command, it puts the
> data to be sent into a qemuMonitorMessagePtr object instance,
> queues it for dispatch, and then goes to sleep on a condition
> variable. The event thread sends all the data, and then waits
> for the reply to arrive, putting the response / error data
> back into the qemuMonitorMessagePtr and notifying the condition
> variable.
>
> * src/qemu/qemu_driver.c: XXX this change shouldn't be here
> * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Remove
> raw I/O functions, and a generic qemuMonitorSend() for
> invoking a command
> * src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h:
> Remove all low level I/O, and use the new qemuMonitorSend()
> API. Provide a qemuMonitorTextIOProcess() method for detecting
> command/reply/prompt boundaries in the monitor data stream
I tried to review it, but honnestly I can't keep up, it's getting
too complex. But I don't want to block, ACK
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list