mirror of
https://github.com/mii443/qemu.git
synced 2025-12-17 01:28:52 +00:00
migration: cleanup stats update into function
We have quite a few lines in migration_thread() that calculates some statistics for the migration interations. Isolate it into a single function to improve readability. Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
@@ -102,6 +102,17 @@ struct MigrationState
|
||||
QEMUBH *cleanup_bh;
|
||||
QEMUFile *to_dst_file;
|
||||
|
||||
/* bytes already send at the beggining of current interation */
|
||||
uint64_t iteration_initial_bytes;
|
||||
/* time at the start of current iteration */
|
||||
int64_t iteration_start_time;
|
||||
/*
|
||||
* The final stage happens when the remaining data is smaller than
|
||||
* this threshold; it's calculated from the requested downtime and
|
||||
* measured bandwidth
|
||||
*/
|
||||
int64_t threshold_size;
|
||||
|
||||
/* params from 'migrate-set-parameters' */
|
||||
MigrationParameters parameters;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user