From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH 2/2] allow changing the speed of a running migration
Date: Wed, 20 May 2009 18:26:58 -0400 [thread overview]
Message-ID: <1242858418-10553-3-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1242858418-10553-2-git-send-email-glommer@redhat.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 <glommer@redhat.com>
---
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
prev parent reply other threads:[~2009-05-20 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 22:26 [Qemu-devel] [PATCH 0/2] make migrate_set_speed work while migration is running Glauber Costa
2009-05-20 22:26 ` [Qemu-devel] [PATCH 1/2] introduce set_rate_limit function for QEMUFile Glauber Costa
2009-05-20 22:26 ` Glauber Costa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242858418-10553-3-git-send-email-glommer@redhat.com \
--to=glommer@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).