[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/51] ram: Move xbzrle_pages into RAMState
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 18/51] ram: Move xbzrle_pages into RAMState |
Date: |
Thu, 23 Mar 2017 21:45:11 +0100 |
Signed-off-by: Juan Quintela <address@hidden>
---
migration/ram.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 721fd66..b4e647a 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -174,6 +174,8 @@ struct RAMState {
uint64_t iterations;
/* xbzrle transmitted bytes */
uint64_t xbzrle_bytes;
+ /* xbzrle transmmited pages */
+ uint64_t xbzrle_pages;
};
typedef struct RAMState RAMState;
@@ -181,7 +183,6 @@ static RAMState ram_state;
/* accounting for migration statistics */
typedef struct AccountingInfo {
- uint64_t xbzrle_pages;
uint64_t xbzrle_cache_miss;
double xbzrle_cache_miss_rate;
uint64_t xbzrle_overflows;
@@ -211,7 +212,7 @@ uint64_t xbzrle_mig_bytes_transferred(void)
uint64_t xbzrle_mig_pages_transferred(void)
{
- return acct_info.xbzrle_pages;
+ return ram_state.xbzrle_pages;
}
uint64_t xbzrle_mig_pages_cache_miss(void)
@@ -544,7 +545,7 @@ static int save_xbzrle_page(RAMState *rs, QEMUFile *f,
uint8_t **current_data,
qemu_put_be16(f, encoded_len);
qemu_put_buffer(f, XBZRLE.encoded_buf, encoded_len);
bytes_xbzrle += encoded_len + 1 + 2;
- acct_info.xbzrle_pages++;
+ rs->xbzrle_pages++;
rs->xbzrle_bytes += bytes_xbzrle;
*bytes_transferred += bytes_xbzrle;
@@ -1997,6 +1998,7 @@ static int ram_save_init_globals(RAMState *rs)
rs->norm_pages = 0;
rs->iterations = 0;
rs->xbzrle_bytes = 0;
+ rs->xbzrle_pages = 0;
migration_bitmap_sync_init(rs);
qemu_mutex_init(&migration_bitmap_mutex);
--
2.9.3
- [Qemu-devel] [PATCH 11/51] ram: Move dup_pages into RAMState, (continued)
- [Qemu-devel] [PATCH 11/51] ram: Move dup_pages into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 16/51] ram: Move iterations into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 14/51] ram: Move norm_pages to RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 15/51] ram: Remove norm_mig_bytes_transferred, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 17/51] ram: Move xbzrle_bytes into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 18/51] ram: Move xbzrle_pages into RAMState,
Juan Quintela <=
- [Qemu-devel] [PATCH 19/51] ram: Move xbzrle_cache_miss into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 20/51] ram: Move xbzrle_cache_miss_rate into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 21/51] ram: Move xbzrle_overflows into RAMState, Juan Quintela, 2017/03/23