From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M6uFe-0007F8-9c for qemu-devel@nongnu.org; Wed, 20 May 2009 18:27:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M6uFZ-0007Ea-L5 for qemu-devel@nongnu.org; Wed, 20 May 2009 18:27:05 -0400 Received: from [199.232.76.173] (port=44449 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M6uFZ-0007EO-9V for qemu-devel@nongnu.org; Wed, 20 May 2009 18:27:01 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43522) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M6uFY-0000Jg-RU for qemu-devel@nongnu.org; Wed, 20 May 2009 18:27:01 -0400 From: Glauber Costa Date: Wed, 20 May 2009 18:26:58 -0400 Message-Id: <1242858418-10553-3-git-send-email-glommer@redhat.com> In-Reply-To: <1242858418-10553-2-git-send-email-glommer@redhat.com> References: <1242858418-10553-1-git-send-email-glommer@redhat.com> <1242858418-10553-2-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] allow changing the speed of a running migration List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com 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 --- 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