[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix
From: |
Lei Li |
Subject: |
[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing |
Date: |
Mon, 2 Dec 2013 17:19:15 +0800 |
Add page flipping support on unix outgoing part by stopping
VM with the new RunState RUN_STATE_MEMORY_STALE before
invoking migration if unix_page_flipping enabled.
Signed-off-by: Lei Li <address@hidden>
---
migration-unix.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/migration-unix.c b/migration-unix.c
index 9beeafe..cbf2087 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -19,6 +19,7 @@
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "block/block.h"
+#include "sysemu/sysemu.h"
//#define DEBUG_MIGRATION_UNIX
@@ -33,6 +34,7 @@
static void unix_wait_for_connect(int fd, void *opaque)
{
MigrationState *s = opaque;
+ int ret;
if (fd < 0) {
DPRINTF("migrate connect error\n");
@@ -47,6 +49,15 @@ static void unix_wait_for_connect(int fd, void *opaque)
goto fail;
}
+ /* Stop VM before invoking migration if unix_page_flipping enabled */
+ if (migrate_unix_page_flipping()) {
+ ret = vm_stop_force_state(RUN_STATE_MEMORY_STALE);
+ if (ret < 0) {
+ DPRINTF("failed to stop VM\n");
+ goto fail;
+ }
+ }
+
migrate_fd_connect(s);
return;
}
--
1.7.7.6
- Re: [Qemu-devel] [PATCH 06/17] migration-local: add send_pipefd(), (continued)
[Qemu-devel] [PATCH 07/17] save_page: replace block_offset with a MemoryRegion, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 08/17] migration-local: override save_page for page transmit, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 09/17] savevm: adjust ram_control_save_page for page flipping, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 10/17] add unix_msgfd_lookup() to callback get_buffer, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 11/17] add argument ram_addr_t to hook_ram_load, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 12/17] migration-local: override hook_ram_load, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 13/17] migration-unix: replace qemu_fopen_socket with qemu_fopen_socket_local, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 14/17] add new RunState RUN_STATE_MEMORY_STALE, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 15/17] migration-unix: page flipping support on unix outgoing,
Lei Li <=
[Qemu-devel] [PATCH 16/17] migration: adjust migration_thread() process for page flipping, Lei Li, 2013/12/02
[Qemu-devel] [PATCH 17/17] hmp: better format for info migrate_capabilities, Lei Li, 2013/12/02
Re: [Qemu-devel] [PATCH 0/17 v5] Localhost migration with side channel for ram, Paolo Bonzini, 2013/12/03