[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/13] migration: use s->threshold_size inside migrat
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 04/13] migration: use s->threshold_size inside migration_update_counters |
Date: |
Mon, 29 Jan 2018 13:09:23 +0100 |
From: Wei Wang <address@hidden>
Fixes: b15df1ae50 ("migration: cleanup stats update into function")
The threshold size is changed to be recorded in s->threshold_size.
Signed-off-by: Wei Wang <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/migration.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 1fbd304c66..44cbfb0ddd 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2169,7 +2169,6 @@ static void migration_update_counters(MigrationState *s,
int64_t current_time)
{
uint64_t transferred, time_spent;
- int64_t threshold_size;
double bandwidth;
if (current_time < s->iteration_start_time + BUFFER_DELAY) {
@@ -2179,7 +2178,7 @@ static void migration_update_counters(MigrationState *s,
transferred = qemu_ftell(s->to_dst_file) - s->iteration_initial_bytes;
time_spent = current_time - s->iteration_start_time;
bandwidth = (double)transferred / time_spent;
- threshold_size = bandwidth * s->parameters.downtime_limit;
+ s->threshold_size = bandwidth * s->parameters.downtime_limit;
s->mbps = (((double) transferred * 8.0) /
((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
@@ -2199,7 +2198,7 @@ static void migration_update_counters(MigrationState *s,
s->iteration_initial_bytes = qemu_ftell(s->to_dst_file);
trace_migrate_transferred(transferred, time_spent,
- bandwidth, threshold_size);
+ bandwidth, s->threshold_size);
}
/* Migration thread iteration status */
--
2.14.3
- [Qemu-devel] [PULL 00/13] Migration PULL request, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 01/13] migration: Allow migrate_fd_connect to take an Error *, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 02/13] migration: Route errors down through migration_channel_connect, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 03/13] migration/savevm.c: set MAX_VM_CMD_PACKAGED_SIZE to 1ul << 32, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 04/13] migration: use s->threshold_size inside migration_update_counters,
Juan Quintela <=
- [Qemu-devel] [PULL 05/13] migration: Drop current address parameter from save_zero_page(), Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 07/13] tests: Consolidate accelerators declaration, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 06/13] tests: Remove deprecated migration tests commands, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 09/13] tests: Add deprecated commands migration test, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 08/13] tests: Use consistent names for migration, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 12/13] tests: Create migrate-start-postcopy command, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 10/13] tests: Add migration precopy test, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 11/13] tests: Add migration xbzrle test, Juan Quintela, 2018/01/29
- [Qemu-devel] [PULL 13/13] tests: Adjust sleeps for migration test, Juan Quintela, 2018/01/29
- Re: [Qemu-devel] [PULL 00/13] Migration PULL request, Peter Maydell, 2018/01/29