cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From 43f7374cfc7133025aa4c94f51d6733ee89b713d Mon Sep 17 00:00:00 2001
9ae3a8
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
9ae3a8
Date: Tue, 14 Jan 2014 15:27:12 -0500
9ae3a8
Subject: [PATCH 03/14] migration: Fix rate limit
9ae3a8
9ae3a8
Message-id: <1389713232-30999-3-git-send-email-dgilbert@redhat.com>
9ae3a8
Patchwork-id: 56698
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 2/2] migration: Fix rate limit
9ae3a8
Bugzilla: 1003467
9ae3a8
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
From: Matthew Garrett <matthew.garrett@nebula.com>
9ae3a8
9ae3a8
The migration thread appears to want to allow writeout to occur at full
9ae3a8
speed rather than being rate limited during completion of state saving,
9ae3a8
but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes
9ae3a8
problems if there's more than 2GB of state left to save at this point. It
9ae3a8
probably ought to just be INT64_MAX instead.
9ae3a8
9ae3a8
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
9ae3a8
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
Signed-off-by: Juan Quintela <quintela@redhat.com>
9ae3a8
(cherry picked from commit 40596834c0d57a223124a956ccbe39dfeadc9f0e)
9ae3a8
---
9ae3a8
 migration.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 migration.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/migration.c b/migration.c
9ae3a8
index 13fc59b..ef9a61f 100644
9ae3a8
--- a/migration.c
9ae3a8
+++ b/migration.c
9ae3a8
@@ -589,7 +589,7 @@ static void *migration_thread(void *opaque)
9ae3a8
 
9ae3a8
                 ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
9ae3a8
                 if (ret >= 0) {
9ae3a8
-                    qemu_file_set_rate_limit(s->file, INT_MAX);
9ae3a8
+                    qemu_file_set_rate_limit(s->file, INT64_MAX);
9ae3a8
                     qemu_savevm_state_complete(s->file);
9ae3a8
                 }
9ae3a8
                 qemu_mutex_unlock_iothread();
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8