[libvirt] [PATCH 1/8] remote: Don't lose track of events when callbacks are slow

Eric Blake eblake at redhat.com
Mon Jan 10 17:53:56 UTC 2011


On 01/10/2011 10:38 AM, Cole Robinson wrote:
> After the remote driver runs an event callback, it unconditionally disables the
> loop timer, thinking it just flushed every queued event. This doesn't work
> correctly though if an event is queued while a callback is running.
> 
> The events actually aren't being lost, it's just that the event loop didn't
> think there was anything that needed to be dispatched. So all those 'lost
> events' should actually get re-triggered if you manually kick the loop by
> generating a new event (like creating a new guest).
> 
> The solution is to disable the dispatch timer _before_ we invoke any event
> callbacks. Events queued while a callback is running will properly reenable the
> timer.

ACK.  Matches the order in src/qemu/qemu_driver.c:qemuDomainEventFlush.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110110/519c2bad/attachment-0001.sig>


More information about the libvir-list mailing list