aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2013-03-26 10:58:37 +0100
committerJuan Quintela <quintela@redhat.com>2013-03-26 13:32:33 +0100
commitf1c72795af573b24a7da5eb52375c9aba8a37972 (patch)
tree9475bdb59345550bb248fad75fa25e598811fe51 /hmp.c
parent78d07ae7ac74bcc7f79aeefbaff17fb142f44b4d (diff)
downloadqemu-f1c72795af573b24a7da5eb52375c9aba8a37972.zip
qemu-f1c72795af573b24a7da5eb52375c9aba8a37972.tar.gz
qemu-f1c72795af573b24a7da5eb52375c9aba8a37972.tar.bz2
migration: do not sent zero pages in bulk stage
during bulk stage of ram migration if a page is a zero page do not send it at all. the memory at the destination reads as zero anyway. even if there is an madvise with QEMU_MADV_DONTNEED at the target upon receipt of a zero page I have observed that the target starts swapping if the memory is overcommitted. it seems that the pages are dropped asynchronously. this patch also updates QMP to return the number of skipped pages in MigrationStats. Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index b0a861c..e3e833e 100644
--- a/hmp.c
+++ b/hmp.c
@@ -173,6 +173,8 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
info->ram->total >> 10);
monitor_printf(mon, "duplicate: %" PRIu64 " pages\n",
info->ram->duplicate);
+ monitor_printf(mon, "skipped: %" PRIu64 " pages\n",
+ info->ram->skipped);
monitor_printf(mon, "normal: %" PRIu64 " pages\n",
info->ram->normal);
monitor_printf(mon, "normal bytes: %" PRIu64 " kbytes\n",