From 4addcd4fdc94c369f4cd54f8e03396ff26fce34d Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Wed, 16 Dec 2015 11:47:36 +0000 Subject: Migration: Emit event at start of pass Emit an event each time we sync the dirty bitmap on the source; this helps libvirt use postcopy by giving it a kick when it might be a good idea to start the postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: Amit Shah Message-Id: <1450266458-3178-5-git-send-email-dgilbert@redhat.com> Signed-off-by: Amit Shah --- migration/ram.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'migration/ram.c') diff --git a/migration/ram.c b/migration/ram.c index 0490f00..102d1f2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -27,6 +27,7 @@ */ #include #include +#include "qapi-event.h" #include "qemu/bitops.h" #include "qemu/bitmap.h" #include "qemu/timer.h" @@ -682,6 +683,9 @@ static void migration_bitmap_sync(void) num_dirty_pages_period = 0; } s->dirty_sync_count = bitmap_sync_count; + if (migrate_use_events()) { + qapi_event_send_migration_pass(bitmap_sync_count, NULL); + } } /** -- cgit v1.1