qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <matthew.garrett@nebula.com>
To: qemu-devel@nongnu.org
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Subject: [Qemu-devel] [PATCH] migration: Fix rate limit
Date: Mon, 25 Nov 2013 14:42:43 -0500	[thread overview]
Message-ID: <1385408563-14331-1-git-send-email-matthew.garrett@nebula.com> (raw)

The migration thread appears to want to allow writeout to occur at full
speed rather than being rate limited during completion of state saving,
but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes
problems if there's more than 2GB of state left to save at this point. It
probably ought to just be INT64_MAX instead.

Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
---
 migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 2b1ab20..ff00bfb 100644
--- a/migration.c
+++ b/migration.c
@@ -583,7 +583,7 @@ static void *migration_thread(void *opaque)
 
                 ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
                 if (ret >= 0) {
-                    qemu_file_set_rate_limit(s->file, INT_MAX);
+                    qemu_file_set_rate_limit(s->file, INT64_MAX);
                     qemu_savevm_state_complete(s->file);
                 }
                 qemu_mutex_unlock_iothread();
-- 
1.8.4.2

             reply	other threads:[~2013-11-25 19:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 19:42 Matthew Garrett [this message]
2013-12-03 17:18 ` [Qemu-devel] [PATCH] migration: Fix rate limit Matthew Garrett
2013-12-03 17:21   ` Paolo Bonzini

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=1385408563-14331-1-git-send-email-matthew.garrett@nebula.com \
    --to=matthew.garrett@nebula.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).