[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 16/31] ram: Move xbzrle_pages into RAMState
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 16/31] ram: Move xbzrle_pages into RAMState |
Date: |
Wed, 15 Mar 2017 14:50:06 +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 02bbe53..ce703e5 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -168,6 +168,8 @@ struct RAMState {
uint64_t iterations;
/* xbzrle transmitted bytes */
uint64_t xbzrle_bytes;
+ /* xbzrle transmmited pages */
+ uint64_t xbzrle_pages;
};
typedef struct RAMState RAMState;
@@ -175,7 +177,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;
@@ -205,7 +206,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)
@@ -527,7 +528,7 @@ static int save_xbzrle_page(QEMUFile *f, RAMState *rs,
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;
@@ -1930,6 +1931,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
- Re: [Qemu-devel] [PATCH 14/31] ram: Move iterations into RAMState, (continued)
- [Qemu-devel] [PATCH 11/31] ram: Remove unused pages_skiped variable, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 15/31] ram: Move xbzrle_bytes into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 19/31] ram: move xbzrle_overflows into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 21/31] ram: Everything was init to zero, so use memset, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 18/31] ram: move xbzrle_cache_miss_rate into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 17/31] ram: Move xbzrle_cache_miss into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 16/31] ram: Move xbzrle_pages into RAMState,
Juan Quintela <=
- [Qemu-devel] [PATCH 22/31] ram: move migration_bitmap_mutex into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 20/31] ram: move migration_dirty_pages to RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 23/31] ram: Move migration_bitmap_rcu into RAMState, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 25/31] ram: Use the RAMState bytes_transferred parameter, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 26/31] ram: Remove ram_save_remaining, Juan Quintela, 2017/03/15
- [Qemu-devel] [PATCH 27/31] ram: Move last_req_rb to RAMState, Juan Quintela, 2017/03/15