qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	Juan Quintela <quintela@redhat.com>
Subject: [PULL 7/7] migration: allow enabling mutilfd for specific protocol only
Date: Thu,  9 Sep 2021 12:33:46 +0200	[thread overview]
Message-ID: <20210909103346.1990-8-quintela@redhat.com> (raw)
In-Reply-To: <20210909103346.1990-1-quintela@redhat.com>

From: Li Zhijian <lizhijian@cn.fujitsu.com>

To: <quintela@redhat.com>, <dgilbert@redhat.com>, <qemu-devel@nongnu.org>
CC: Li Zhijian <lizhijian@cn.fujitsu.com>
Date: Sat, 31 Jul 2021 22:05:52 +0800 (5 weeks, 4 days, 17 hours ago)

And change the default to true so that in '-incoming defer' case, user is able
to change multifd capability.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/migration.c | 8 ++++++++
 migration/multifd.c   | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index 10e7616a48..77f9a3cfd3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1237,6 +1237,14 @@ static bool migrate_caps_check(bool *cap_list,
         }
     }
 
+    /* incoming side only */
+    if (runstate_check(RUN_STATE_INMIGRATE) &&
+        !migrate_multifd_is_allowed() &&
+        cap_list[MIGRATION_CAPABILITY_MULTIFD]) {
+        error_setg(errp, "multifd is not supported by current protocol");
+        return false;
+    }
+
     return true;
 }
 
diff --git a/migration/multifd.c b/migration/multifd.c
index 283f672bf0..7c9deb1921 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -868,7 +868,7 @@ cleanup:
     multifd_new_send_channel_cleanup(p, sioc, local_err);
 }
 
-static bool migrate_allow_multifd;
+static bool migrate_allow_multifd = true;
 void migrate_protocol_allow_multifd(bool allow)
 {
     migrate_allow_multifd = allow;
-- 
2.31.1



  parent reply	other threads:[~2021-09-09 10:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09 10:33 [PULL 0/7] Migration.next patches Juan Quintela
2021-09-09 10:33 ` [PULL 1/7] multifd: Implement yank for multifd send side Juan Quintela
2021-09-09 10:33 ` [PULL 2/7] multifd: Unconditionally unregister yank function Juan Quintela
2021-09-09 10:33 ` [PULL 3/7] migration/rdma: Try to register On-Demand Paging memory region Juan Quintela
2021-09-09 10:33 ` [PULL 4/7] migration/rdma: advise prefetch write for ODP region Juan Quintela
2021-09-09 10:33 ` [PULL 5/7] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*() Juan Quintela
2021-09-09 10:33 ` [PULL 6/7] migration: allow multifd for socket protocol only Juan Quintela
2021-09-09 10:33 ` Juan Quintela [this message]
2021-09-09 13:42 ` [PULL 0/7] Migration.next patches Peter Maydell
2021-09-09 14:48   ` Li, Zhijian
2021-09-09 14:59     ` Peter Maydell
2021-09-09 15:23     ` Juan Quintela
2021-09-09 15:36       ` Peter Maydell
2021-09-09 16:10     ` Juan Quintela
2021-09-10  5:20       ` lizhijian
2021-09-10  5:27         ` lizhijian
2021-09-10  7:00           ` Juan Quintela
2021-09-10  8:52             ` lizhijian
2021-09-10 12:55           ` Philippe Mathieu-Daudé
2021-09-10 13:10             ` Li, Zhijian

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=20210909103346.1990-8-quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lizhijian@cn.fujitsu.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).