mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06: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:
parent
39b9e17905
commit
b15df1ae50
2 changed files with 60 additions and 35 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue