qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] allow changing the speed of a running migration


From: Glauber Costa
Subject: [Qemu-devel] [PATCH 2/2] allow changing the speed of a running migration
Date: Wed, 20 May 2009 18:26:58 -0400

This patch allow us to call migrate_set_speed on running
migrations. This should allow mgmt tools to increase the allocated
bandwidth of a running migration if there is no progress, and they
really want the migration to succeed.

Signed-off-by: Glauber Costa <address@hidden>
---
 migration.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/migration.c b/migration.c
index ca397fa..b9e3368 100644
--- a/migration.c
+++ b/migration.c
@@ -84,6 +84,7 @@ void do_migrate_set_speed(Monitor *mon, const char *value)
 {
     double d;
     char *ptr;
+    FdMigrationState *s;
 
     d = strtod(value, &ptr);
     switch (*ptr) {
@@ -98,6 +99,12 @@ void do_migrate_set_speed(Monitor *mon, const char *value)
     }
 
     max_throttle = (uint32_t)d;
+    s = migrate_to_fms(current_migration);
+
+    if (s) {
+        qemu_file_set_rate_limit(s->file, max_throttle);
+    }
+    
 }
 
 void do_info_migrate(Monitor *mon)
-- 
1.5.6.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]