From patchwork Fri Feb 1 12:32:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 217457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 571422C0297 for ; Sat, 2 Feb 2013 00:32:32 +1100 (EST) Received: from localhost ([::1]:53105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fnv-0005VH-1T for incoming@patchwork.ozlabs.org; Fri, 01 Feb 2013 07:33:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fni-0005UQ-8D for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1Fnh-0000N3-8U for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1Fnh-0000Mr-1u for qemu-devel@nongnu.org; Fri, 01 Feb 2013 07:33:01 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r11CX0Xm021296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Feb 2013 07:33:00 -0500 Received: from trasno.mitica (ovpn-113-123.phx2.redhat.com [10.3.113.123]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r11CWvKN020403; Fri, 1 Feb 2013 07:32:59 -0500 From: Juan Quintela To: Qemu Devel , Anthony Liguori Date: Fri, 1 Feb 2013 13:32:53 +0100 Message-Id: <1359721976-19238-2-git-send-email-quintela@redhat.com> In-Reply-To: <1359721976-19238-1-git-send-email-quintela@redhat.com> References: <1359721976-19238-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/4] migration: change initial value of expected_downtime X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Orit Wasserman --- 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;