[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 31/51] ram: Create ram_dirty_sync_count()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 31/51] ram: Create ram_dirty_sync_count() |
Date: |
Thu, 23 Mar 2017 21:45:24 +0100 |
This is a ram field that was inside MigrationState. Move it to
RAMState and make it the same that the other ram stats.
Signed-off-by: Juan Quintela <address@hidden>
---
include/migration/migration.h | 2 +-
migration/migration.c | 3 +--
migration/ram.c | 6 +++++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 8a6caa3..768fa72 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -159,7 +159,6 @@ struct MigrationState
bool enabled_capabilities[MIGRATION_CAPABILITY__MAX];
int64_t xbzrle_cache_size;
int64_t setup_time;
- int64_t dirty_sync_count;
/* Count of requests incoming from destination */
int64_t postcopy_requests;
@@ -255,6 +254,7 @@ void migrate_decompress_threads_join(void);
uint64_t ram_bytes_remaining(void);
uint64_t ram_bytes_transferred(void);
uint64_t ram_bytes_total(void);
+uint64_t ram_dirty_sync_count(void);
void free_xbzrle_decoded_buf(void);
void acct_update_position(QEMUFile *f, size_t size, bool zero);
diff --git a/migration/migration.c b/migration/migration.c
index 58c1587..983c3d9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -648,7 +648,7 @@ static void populate_ram_info(MigrationInfo *info,
MigrationState *s)
info->ram->normal_bytes = norm_mig_pages_transferred() *
(1ul << qemu_target_page_bits());
info->ram->mbps = s->mbps;
- info->ram->dirty_sync_count = s->dirty_sync_count;
+ info->ram->dirty_sync_count = ram_dirty_sync_count();
info->ram->postcopy_requests = s->postcopy_requests;
if (s->state != MIGRATION_STATUS_COMPLETED) {
@@ -1112,7 +1112,6 @@ MigrationState *migrate_init(const MigrationParams
*params)
s->dirty_pages_rate = 0;
s->dirty_bytes_rate = 0;
s->setup_time = 0;
- s->dirty_sync_count = 0;
s->start_postcopy = false;
s->postcopy_after_devices = false;
s->postcopy_requests = 0;
diff --git a/migration/ram.c b/migration/ram.c
index 601370c..98095ea 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -270,6 +270,11 @@ uint64_t ram_bytes_remaining(void)
return ram_state.migration_dirty_pages * TARGET_PAGE_SIZE;
}
+uint64_t ram_dirty_sync_count(void)
+{
+ return ram_state.bitmap_sync_count;
+}
+
/* used by the search for pages to send */
struct PageSearchStatus {
/* Current block being searched */
@@ -726,7 +731,6 @@ static void migration_bitmap_sync(RAMState *rs)
rs->start_time = end_time;
rs->num_dirty_pages_period = 0;
}
- s->dirty_sync_count = rs->bitmap_sync_count;
if (migrate_use_events()) {
qapi_event_send_migration_pass(rs->bitmap_sync_count, NULL);
}
--
2.9.3
- Re: [Qemu-devel] [PATCH 29/51] ram: Move last_req_rb to RAMState, (continued)
- [Qemu-devel] [PATCH 32/51] ram: Remove dirty_bytes_rate, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 33/51] ram: Move dirty_pages_rate to RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 30/51] ram: Move src_page_req* to RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 31/51] ram: Create ram_dirty_sync_count(),
Juan Quintela <=
- [Qemu-devel] [PATCH 34/51] ram: Move postcopy_requests into RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 35/51] ram: Add QEMUFile to RAMState, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 38/51] migration: Remove MigrationState from migration_in_postcopy, Juan Quintela, 2017/03/23
- [Qemu-devel] [PATCH 36/51] ram: Move QEMUFile into RAMState, Juan Quintela, 2017/03/23