summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2013-02-01 11:12:26 +0100
committerJuan Quintela <quintela@redhat.com>2013-02-22 10:12:52 +0100
commitcc283e3bf04d2f64eb6ec2ee5bcd36edd779fe89 (patch)
tree684c6d1136b20e77d0647e907555ffcd4f62393a /migration.c
parent73d4dc71f3a41131541c73b3ac2a8b160a51842b (diff)
migration: change initial value of expected_downtime
0 is a very bad initial value, what we are trying to get is max_downtime, so that is a much better estimation. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index b1ebb01145..b3f5ba41f5 100644
--- a/migration.c
+++ b/migration.c
@@ -774,6 +774,8 @@ void migrate_fd_connect(MigrationState *s)
s->buffer = NULL;
s->buffer_size = 0;
s->buffer_capacity = 0;
+ /* This is a best 1st approximation. ns to ms */
+ s->expected_downtime = max_downtime/1000000;
s->xfer_limit = s->bandwidth_limit / XFER_LIMIT_RATIO;
s->complete = false;