summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao Guangrong2018-06-04 11:55:11 +0200
committerDr. David Alan Gilbert2018-06-15 15:40:56 +0200
commite0e7a45d7fa64563191d3723fc4a4570122e6e42 (patch)
tree368877ce9bc5b038496a4f5cd78e43fcc5a6ca55
parentmigration/block-dirty-bitmap: fix dirty_bitmap_load (diff)
downloadqemu-e0e7a45d7fa64563191d3723fc4a4570122e6e42.tar.gz
qemu-e0e7a45d7fa64563191d3723fc4a4570122e6e42.tar.xz
qemu-e0e7a45d7fa64563191d3723fc4a4570122e6e42.zip
migration: fix counting xbzrle cache_miss_rate
Sync up xbzrle_cache_miss_prev only after migration iteration goes forward Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com> Message-Id: <20180604095520.8563-4-xiaoguangrong@tencent.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-rw-r--r--migration/ram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/ram.c b/migration/ram.c
index e0d19305ee..d273a19699 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1200,9 +1200,9 @@ static void migration_bitmap_sync(RAMState *rs)
(double)(xbzrle_counters.cache_miss -
rs->xbzrle_cache_miss_prev) /
(rs->iterations - rs->iterations_prev);
+ rs->xbzrle_cache_miss_prev = xbzrle_counters.cache_miss;
}
rs->iterations_prev = rs->iterations;
- rs->xbzrle_cache_miss_prev = xbzrle_counters.cache_miss;
}
/* reset period counters */