diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2018-03-13 15:34:00 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2018-03-13 17:05:41 -0400 |
commit | 4799502640e6a29d37dacb116a590fc03bacbb01 (patch) | |
tree | fc0d7233ce4741e9276f200e7d3917cd9c9d5dd4 /migration/migration.c | |
parent | 4f43e9535bdd768bff4e30e229404407d44ad4c8 (diff) |
migration: introduce postcopy-only pending
There would be savevm states (dirty-bitmap) which can migrate only in
postcopy stage. The corresponding pending is introduced here.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20180313180320.339796-6-vsementsov@virtuozzo.com
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/migration/migration.c b/migration/migration.c index 6a4780ef6f..90307f8ab5 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2242,20 +2242,20 @@ typedef enum { */ static MigIterateState migration_iteration_run(MigrationState *s) { - uint64_t pending_size, pend_post, pend_nonpost; + uint64_t pending_size, pend_pre, pend_compat, pend_post; bool in_postcopy = s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE; - qemu_savevm_state_pending(s->to_dst_file, s->threshold_size, - &pend_nonpost, &pend_post); - pending_size = pend_nonpost + pend_post; + qemu_savevm_state_pending(s->to_dst_file, s->threshold_size, &pend_pre, + &pend_compat, &pend_post); + pending_size = pend_pre + pend_compat + pend_post; trace_migrate_pending(pending_size, s->threshold_size, - pend_post, pend_nonpost); + pend_pre, pend_compat, pend_post); if (pending_size && pending_size >= s->threshold_size) { /* Still a significant amount to transfer */ if (migrate_postcopy() && !in_postcopy && - pend_nonpost <= s->threshold_size && + pend_pre <= s->threshold_size && atomic_read(&s->start_postcopy)) { if (postcopy_start(s)) { error_report("%s: postcopy failed to start", __func__); |