提交 4addcd4f 编写于 作者: D Dr. David Alan Gilbert 提交者: Amit Shah

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: NDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: NJuan Quintela <quintela@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NAmit Shah <amit.shah@redhat.com>
Message-Id: <1450266458-3178-5-git-send-email-dgilbert@redhat.com>
Signed-off-by: NAmit Shah <amit.shah@redhat.com>
上级 6ba996bb
......@@ -496,6 +496,20 @@ Example:
{"timestamp": {"seconds": 1432121972, "microseconds": 744001},
"event": "MIGRATION", "data": {"status": "completed"}}
MIGRATION_PASS
--------------
Emitted from the source side of a migration at the start of each pass
(when it syncs the dirty bitmap)
Data: None.
- "pass": An incrementing count (starting at 1 on the first pass)
Example:
{"timestamp": {"seconds": 1449669631, "microseconds": 239225},
"event": "MIGRATION_PASS", "data": {"pass": 2}}
STOP
----
......
......@@ -27,6 +27,7 @@
*/
#include <stdint.h>
#include <zlib.h>
#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);
}
}
/**
......
......@@ -254,6 +254,19 @@
{ 'event': 'MIGRATION',
'data': {'status': 'MigrationStatus'}}
##
# @MIGRATION_PASS
#
# Emitted from the source side of a migration at the start of each pass
# (when it syncs the dirty bitmap)
#
# @pass: An incrementing count (starting at 1 on the first pass)
#
# Since: 2.6
##
{ 'event': 'MIGRATION_PASS',
'data': { 'pass': 'int' } }
##
# @ACPI_DEVICE_OST
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册