From: Jason Wang <jasowang@redhat.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: Derek Su <dereksu@qnap.com>, Zhang Chen <chen.zhang@intel.com>,
"Rao, Lei" <lei.rao@intel.com>, Jason Wang <jasowang@redhat.com>
Subject: [PULL 04/17] Reduce the time of checkpoint for COLO
Date: Wed, 11 Nov 2020 21:11:28 +0800 [thread overview]
Message-ID: <1605100301-11317-5-git-send-email-jasowang@redhat.com> (raw)
In-Reply-To: <1605100301-11317-1-git-send-email-jasowang@redhat.com>
From: "Rao, Lei" <lei.rao@intel.com>
we should set ram_bulk_stage to false after ram_state_init,
otherwise the bitmap will be unused in migration_bitmap_find_dirty.
all pages in ram cache will be flushed to the ram of secondary guest
for each checkpoint.
Signed-off-by: Lei Rao <lei.rao@intel.com>
Signed-off-by: Derek Su <dereksu@qnap.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
migration/ram.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index 2da2b62..add5396 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3011,6 +3011,18 @@ static void decompress_data_with_multi_threads(QEMUFile *f,
qemu_mutex_unlock(&decomp_done_lock);
}
+ /*
+ * we must set ram_bulk_stage to false, otherwise in
+ * migation_bitmap_find_dirty the bitmap will be unused and
+ * all the pages in ram cache wil be flushed to the ram of
+ * secondary VM.
+ */
+static void colo_init_ram_state(void)
+{
+ ram_state_init(&ram_state);
+ ram_state->ram_bulk_stage = false;
+}
+
/*
* colo cache: this is for secondary VM, we cache the whole
* memory of the secondary VM, it is need to hold the global lock
@@ -3054,7 +3066,7 @@ int colo_init_ram_cache(void)
}
}
- ram_state_init(&ram_state);
+ colo_init_ram_state();
return 0;
}
--
2.7.4
next prev parent reply other threads:[~2020-11-11 13:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 13:11 [PULL 00/17] Net patches Jason Wang
2020-11-11 13:11 ` [PULL 01/17] virtio-net: Set mac address to hardware if the peer is vdpa Jason Wang
2020-11-11 13:11 ` [PULL 02/17] net/filter-rewriter: destroy g_hash_table in colo_rewriter_cleanup Jason Wang
2020-11-11 13:11 ` [PULL 03/17] Optimize seq_sorter function for colo-compare Jason Wang
2020-11-11 13:11 ` Jason Wang [this message]
2020-11-11 13:11 ` [PULL 05/17] Fix the qemu crash when guest shutdown in COLO mode Jason Wang
2020-11-11 13:11 ` [PULL 06/17] colo-compare: fix missing compare_seq initialization Jason Wang
2020-11-11 13:11 ` [PULL 07/17] colo-compare: check mark in mutual exclusion Jason Wang
2020-11-11 13:11 ` [PULL 08/17] net/colo-compare.c: Fix compare_timeout format issue Jason Wang
2020-11-11 13:11 ` [PULL 09/17] net/colo-compare.c: Change the timer clock type Jason Wang
2020-11-11 13:11 ` [PULL 10/17] net/colo-compare.c: Add secondary old packet detection Jason Wang
2020-11-11 13:11 ` [PULL 11/17] net/colo-compare.c: Increase default queued packet scan frequency Jason Wang
2020-11-11 13:11 ` [PULL 12/17] net: remove an assert call in eth_get_gso_type Jason Wang
2020-11-11 13:11 ` [PULL 13/17] net/l2tpv3: Remove redundant check in net_init_l2tpv3() Jason Wang
2020-11-11 13:11 ` [PULL 14/17] hw/net/can/ctucan: Don't allow guest to write off end of tx_buffer Jason Wang
2020-11-11 13:11 ` [PULL 15/17] hw/net/can/ctucan: Avoid unused value in ctucan_send_ready_buffers() Jason Wang
2020-11-11 13:11 ` [PULL 16/17] hw/net/can/ctucan_core: Handle big-endian hosts Jason Wang
2020-11-11 13:11 ` [PULL 17/17] hw/net/can/ctucan_core: Use stl_le_p to write to tx_buffers Jason Wang
2020-11-11 14:55 ` [PULL 00/17] Net patches Peter Maydell
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=1605100301-11317-5-git-send-email-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=chen.zhang@intel.com \
--cc=dereksu@qnap.com \
--cc=lei.rao@intel.com \
--cc=peter.maydell@linaro.org \
--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).