[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/65] ram: Move xbzrle_cache_miss_rate into RAMState
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 23/65] ram: Move xbzrle_cache_miss_rate into RAMState |
Date: |
Fri, 21 Apr 2017 13:56:04 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
---
migration/ram.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index b70db68..09f9eff 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -179,6 +179,8 @@ struct RAMState {
uint64_t xbzrle_pages;
/* xbzrle number of cache miss */
uint64_t xbzrle_cache_miss;
+ /* xbzrle miss rate */
+ double xbzrle_cache_miss_rate;
};
typedef struct RAMState RAMState;
@@ -186,7 +188,6 @@ static RAMState ram_state;
/* accounting for migration statistics */
typedef struct AccountingInfo {
- double xbzrle_cache_miss_rate;
uint64_t xbzrle_overflows;
} AccountingInfo;
@@ -224,7 +225,7 @@ uint64_t xbzrle_mig_pages_cache_miss(void)
double xbzrle_mig_cache_miss_rate(void)
{
- return acct_info.xbzrle_cache_miss_rate;
+ return ram_state.xbzrle_cache_miss_rate;
}
uint64_t xbzrle_mig_pages_overflow(void)
@@ -699,7 +700,7 @@ static void migration_bitmap_sync(RAMState *rs)
if (migrate_use_xbzrle()) {
if (rs->iterations_prev != rs->iterations) {
- acct_info.xbzrle_cache_miss_rate =
+ rs->xbzrle_cache_miss_rate =
(double)(rs->xbzrle_cache_miss -
rs->xbzrle_cache_miss_prev) /
(rs->iterations - rs->iterations_prev);
@@ -2003,6 +2004,7 @@ static int ram_save_init_globals(RAMState *rs)
rs->xbzrle_bytes = 0;
rs->xbzrle_pages = 0;
rs->xbzrle_cache_miss = 0;
+ rs->xbzrle_cache_miss_rate = 0;
migration_bitmap_sync_init(rs);
qemu_mutex_init(&migration_bitmap_mutex);
--
2.9.3
- [Qemu-devel] [PULL 09/65] ram: Change byte_xfer_{prev, now} type to uint64_t, (continued)
- [Qemu-devel] [PULL 09/65] ram: Change byte_xfer_{prev, now} type to uint64_t, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 12/65] ram: Move xbzrle_cache_miss_prev into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 14/65] ram: Move dup_pages into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 16/65] ram: Remove unused pages_skipped variable, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 15/65] ram: Remove unused dup_mig_bytes_transferred(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 17/65] ram: Move norm_pages to RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 18/65] ram: Remove norm_mig_bytes_transferred, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 19/65] ram: Move iterations into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 20/65] ram: Move xbzrle_bytes into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 21/65] ram: Move xbzrle_pages into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 23/65] ram: Move xbzrle_cache_miss_rate into RAMState,
Juan Quintela <=
- [Qemu-devel] [PULL 24/65] ram: Move xbzrle_overflows into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 22/65] ram: Move xbzrle_cache_miss into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 25/65] ram: Move migration_dirty_pages to RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 26/65] ram: Everything was init to zero, so use memset, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 27/65] ram: Move migration_bitmap_mutex into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 29/65] ram: Move bytes_transferred into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 28/65] ram: Move migration_bitmap_rcu into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 31/65] ram: Remove ram_save_remaining, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 30/65] ram: Use the RAMState bytes_transferred parameter, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 32/65] ram: Move last_req_rb to RAMState, Juan Quintela, 2017/04/21