From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Lidong Chen <jemmy858585@gmail.com>
Cc: quintela@redhat.com, qemu-devel@nongnu.org, galsha@mellanox.com,
aviadye@mellanox.com, licq@mellanox.com, adido@mellanox.com,
Lidong Chen <lidongchen@tencent.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/5] migration: disable RDMA WRITE after postcopy started
Date: Thu, 26 Apr 2018 17:11:03 +0100 [thread overview]
Message-ID: <20180426161103.GJ2631@work-vm> (raw)
In-Reply-To: <1524666934-8064-2-git-send-email-lidongchen@tencent.com>
* Lidong Chen (jemmy858585@gmail.com) wrote:
> RDMA WRITE operations are performed with no notification to the destination
> qemu, then the destination qemu can not wakeup. This patch disable RDMA WRITE
> after postcopy started.
>
> Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> migration/qemu-file.c | 8 ++++++--
> migration/rdma.c | 12 ++++++++++++
> 2 files changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/migration/qemu-file.c b/migration/qemu-file.c
> index bb63c77..add8c3a 100644
> --- a/migration/qemu-file.c
> +++ b/migration/qemu-file.c
> @@ -253,8 +253,12 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
> if (f->hooks && f->hooks->save_page) {
> int ret = f->hooks->save_page(f, f->opaque, block_offset,
> offset, size, bytes_sent);
> - f->bytes_xfer += size;
> - if (ret != RAM_SAVE_CONTROL_DELAYED) {
> + if (ret != RAM_SAVE_CONTROL_NOT_SUPP) {
> + f->bytes_xfer += size;
> + }
> +
> + if (ret != RAM_SAVE_CONTROL_DELAYED &&
> + ret != RAM_SAVE_CONTROL_NOT_SUPP) {
> if (bytes_sent && *bytes_sent > 0) {
> qemu_update_position(f, *bytes_sent);
> } else if (ret < 0) {
> diff --git a/migration/rdma.c b/migration/rdma.c
> index da474fc..a22be43 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -2927,6 +2927,10 @@ static size_t qemu_rdma_save_page(QEMUFile *f, void *opaque,
>
> CHECK_ERROR_STATE();
>
> + if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
> + return RAM_SAVE_CONTROL_NOT_SUPP;
> + }
> +
> qemu_fflush(f);
>
> if (size > 0) {
> @@ -3482,6 +3486,10 @@ static int qemu_rdma_registration_start(QEMUFile *f, void *opaque,
>
> CHECK_ERROR_STATE();
>
> + if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
> + return 0;
> + }
> +
> trace_qemu_rdma_registration_start(flags);
> qemu_put_be64(f, RAM_SAVE_FLAG_HOOK);
> qemu_fflush(f);
> @@ -3504,6 +3512,10 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque,
>
> CHECK_ERROR_STATE();
>
> + if (migrate_get_current()->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) {
> + return 0;
> + }
> +
> qemu_fflush(f);
> ret = qemu_rdma_drain_cq(f, rdma);
>
> --
> 1.8.3.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2018-04-26 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-25 14:35 [Qemu-devel] [PATCH v2 0/5] Enable postcopy RDMA live migration Lidong Chen
2018-04-25 14:35 ` [Qemu-devel] [PATCH v2 1/5] migration: disable RDMA WRITE after postcopy started Lidong Chen
2018-04-26 16:11 ` Dr. David Alan Gilbert [this message]
2018-04-25 14:35 ` [Qemu-devel] [PATCH v2 2/5] migration: create a dedicated connection for rdma return path Lidong Chen
2018-04-26 16:19 ` Dr. David Alan Gilbert
2018-04-25 14:35 ` [Qemu-devel] [PATCH v2 3/5] migration: remove unnecessary variables len in QIOChannelRDMA Lidong Chen
2018-04-26 16:40 ` Dr. David Alan Gilbert
2018-04-27 3:51 ` 858585 jemmy
2018-04-27 9:01 ` Daniel P. Berrangé
2018-04-27 9:04 ` Daniel P. Berrangé
2018-04-25 14:35 ` [Qemu-devel] [PATCH v2 4/5] migration: implement bi-directional RDMA QIOChannel Lidong Chen
2018-04-26 17:36 ` Dr. David Alan Gilbert
2018-04-27 7:56 ` 858585 jemmy
2018-04-27 9:16 ` Daniel P. Berrangé
2018-04-28 4:16 ` 858585 jemmy
2018-04-30 9:18 ` Daniel P. Berrangé
2018-04-25 14:35 ` [Qemu-devel] [PATCH v2 5/5] migration: Stop rdma yielding during incoming postcopy Lidong Chen
2018-04-26 17:54 ` Dr. David Alan Gilbert
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=20180426161103.GJ2631@work-vm \
--to=dgilbert@redhat.com \
--cc=adido@mellanox.com \
--cc=aviadye@mellanox.com \
--cc=galsha@mellanox.com \
--cc=jemmy858585@gmail.com \
--cc=licq@mellanox.com \
--cc=lidongchen@tencent.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).