diff options
author | Xiao Guangrong <xiaoguangrong@tencent.com> | 2018-06-04 17:55:11 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-06-15 14:40:56 +0100 |
commit | e0e7a45d7fa64563191d3723fc4a4570122e6e42 (patch) | |
tree | 368877ce9bc5b038496a4f5cd78e43fcc5a6ca55 /migration/ram.c | |
parent | a36f6ff46f115672cf86d0e1e7cdb1c2fa4d304b (diff) |
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>
Diffstat (limited to 'migration/ram.c')
-rw-r--r-- | migration/ram.c | 2 |
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 */ |