From patchwork Mon Jan 13 17:39:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 310268 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D4B9D2C0079 for ; Tue, 14 Jan 2014 04:41:41 +1100 (EST) Received: from localhost ([::1]:44083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2lW7-0001bd-MF for incoming@patchwork.ozlabs.org; Mon, 13 Jan 2014 12:41:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2lVM-0001NT-EA for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:40:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2lVG-0006Vk-BY for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:40:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2lVG-0006VW-3Q for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:40:46 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0DHefSE026465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 Jan 2014 12:40:41 -0500 Received: from trasno.mitica (ovpn-113-92.phx2.redhat.com [10.3.113.92]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s0DHeZYC019893; Mon, 13 Jan 2014 12:40:40 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 13 Jan 2014 18:39:48 +0100 Message-Id: <1389634834-24181-4-git-send-email-quintela@redhat.com> In-Reply-To: <1389634834-24181-1-git-send-email-quintela@redhat.com> References: <1389634834-24181-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Matthew Garrett , anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH 03/49] migration: Fix rate limit 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 From: Matthew Garrett The migration thread appears to want to allow writeout to occur at full speed rather than being rate limited during completion of state saving, but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes problems if there's more than 2GB of state left to save at this point. It probably ought to just be INT64_MAX instead. Signed-off-by: Matthew Garrett Reviewed-by: Paolo Bonzini Signed-off-by: Juan Quintela --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 4ee341b..e5f6b98 100644 --- a/migration.c +++ b/migration.c @@ -596,7 +596,7 @@ static void *migration_thread(void *opaque) ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); if (ret >= 0) { - qemu_file_set_rate_limit(s->file, INT_MAX); + qemu_file_set_rate_limit(s->file, INT64_MAX); qemu_savevm_state_complete(s->file); } qemu_mutex_unlock_iothread();