Patchwork [1/4] migration: change initial value of expected_downtime

login
register
mail settings
Submitter Juan Quintela
Date Feb. 1, 2013, 12:32 p.m.
Message ID <1359721976-19238-2-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/217457/
State New
Headers show

Comments

Juan Quintela - Feb. 1, 2013, 12:32 p.m.
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>
---
 migration.c | 2 ++
 1 file changed, 2 insertions(+)
Orit Wasserman - Feb. 4, 2013, 12:47 p.m.
On 02/01/2013 02:32 PM, Juan Quintela wrote:
> 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>
> ---
>  migration.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/migration.c b/migration.c
> index 77c1971..d86946e 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -782,6 +782,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;
> 
Reviewed-by: Orit Wasserman <owasserm@redhat.com>

Patch

diff --git a/migration.c b/migration.c
index 77c1971..d86946e 100644
--- a/migration.c
+++ b/migration.c
@@ -782,6 +782,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;