yeahuh / rpms / qemu-kvm

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