From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlJX-0005Gq-KY for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGlJN-0001YI-IQ for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:31 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:44975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlJN-0001Xo-Dl for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:18:21 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Feb 2014 03:18:21 -0500 From: Michael Roth Date: Fri, 21 Feb 2014 02:16:54 -0600 Message-Id: <1392970647-21528-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 18/51] migration: Fix rate limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, qemu-stable@nongnu.org, Petar.Jovanovic@imgtec.com 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 (cherry picked from commit 40596834c0d57a223124a956ccbe39dfeadc9f0e) Signed-off-by: Michael Roth --- migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 2b1ab20..ff00bfb 100644 --- a/migration.c +++ b/migration.c @@ -583,7 +583,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(); -- 1.7.9.5