* [Qemu-devel] [PATCH] ram migration: Properly reset statistics
@ 2009-12-02 10:29 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2009-12-02 10:29 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel
As we may do more than one migration (cancellation, live backup), reset
bytes_transferred on stage 1.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
vl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/vl.c b/vl.c
index dbf1180..dc62c68 100644
--- a/vl.c
+++ b/vl.c
@@ -2896,7 +2896,7 @@ static int ram_save_block(QEMUFile *f)
return found;
}
-static uint64_t bytes_transferred = 0;
+static uint64_t bytes_transferred;
static ram_addr_t ram_save_remaining(void)
{
@@ -2944,6 +2944,8 @@ static int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
}
if (stage == 1) {
+ bytes_transferred = 0;
+
/* Make sure all dirty bits are set */
for (addr = 0; addr < last_ram_offset; addr += TARGET_PAGE_SIZE) {
if (!cpu_physical_memory_get_dirty(addr, MIGRATION_DIRTY_FLAG))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-02 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 10:29 [Qemu-devel] [PATCH] ram migration: Properly reset statistics Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).