qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: dgilbert@redhat.com, quintela@redhat.com, famz@redhat.com,
	stefanha@redhat.com, jjherne@linux.vnet.ibm.com,
	Peter Lieven <pl@kamp.de>
Subject: [Qemu-devel] [PATCH 1/5] migration: do not transfer ram during bulk storage migration
Date: Thu,  8 Mar 2018 12:18:24 +0100	[thread overview]
Message-ID: <1520507908-16743-2-git-send-email-pl@kamp.de> (raw)
In-Reply-To: <1520507908-16743-1-git-send-email-pl@kamp.de>

this patch makes the bulk phase of a block migration to take
place before we start transferring ram. As the bulk block migration
can take a long time its pointless to transfer ram during that phase.

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 migration/ram.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/migration/ram.c b/migration/ram.c
index 5e33e5c..42468ee 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2258,6 +2258,13 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
     int64_t t0;
     int done = 0;
 
+    if (blk_mig_bulk_active()) {
+        /* Avoid transferring ram during bulk phase of block migration as
+         * the bulk phase will usually take a long time and transferring
+         * ram updates during that time is pointless. */
+        goto out;
+    }
+
     rcu_read_lock();
     if (ram_list.version != rs->last_version) {
         ram_state_reset(rs);
@@ -2304,6 +2311,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
      */
     ram_control_after_iterate(f, RAM_CONTROL_ROUND);
 
+out:
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
     ram_counters.transferred += 8;
 
-- 
2.7.4

  reply	other threads:[~2018-03-08 11:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 11:18 [Qemu-devel] [PATCH 0/5] block migration fixes Peter Lieven
2018-03-08 11:18 ` Peter Lieven [this message]
2018-03-08 11:27   ` [Qemu-devel] [PATCH 1/5] migration: do not transfer ram during bulk storage migration Juan Quintela
2018-03-08 11:18 ` [Qemu-devel] [PATCH 2/5] migration/block: reset dirty bitmap before read in bulk phase Peter Lieven
2018-03-08 11:39   ` Juan Quintela
2018-03-08 11:18 ` [Qemu-devel] [PATCH 3/5] migration/block: rename MAX_INFLIGHT_IO to MAX_IO_BUFFERS Peter Lieven
2018-03-08 11:31   ` Juan Quintela
2018-03-09 14:58   ` Dr. David Alan Gilbert
2018-03-09 19:57     ` Peter Lieven
2018-03-08 11:18 ` [Qemu-devel] [PATCH 4/5] migration/block: limit the number of parallel I/O requests Peter Lieven
2018-03-08 12:50   ` Juan Quintela
2018-03-08 13:30     ` Peter Lieven
2018-03-20 13:15       ` Peter Lieven
2018-03-20 18:02   ` Juan Quintela
2018-03-23 16:45   ` Dr. David Alan Gilbert
2018-03-08 11:18 ` [Qemu-devel] [PATCH 5/5] migration/block: compare only read blocks against the rate limiter Peter Lieven
2018-03-20 18:02   ` Juan Quintela

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=1520507908-16743-2-git-send-email-pl@kamp.de \
    --to=pl@kamp.de \
    --cc=dgilbert@redhat.com \
    --cc=famz@redhat.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    /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).