
Daniel P. Berrange wrote:
One scheme would be to have a small buffer - enough to store say 10 events. If the monitor is blocking for write, and the buffer is full then start to discard all further events. When the buffer has more space again, then send an explicit 'overflow' event informing the app that stuff has been dropped from the event queue.
In normal circumstances the app would never see this message, but if there was some unexpected problem causing the app to not process events quickly enough, then at least it would be able to then detect that qemu has discarded alot of events, and re-synchronize its state by running appropriate 'info' commands.
This is pretty much what Linux real-time queued I/O signals do. It's ugly but works. :-) -- Jamie