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>
This commit is contained in:
parent
a36f6ff46f
commit
e0e7a45d7f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user