qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-devel@nongnu.org, lukasstraub2@web.de, quintela@redhat.com,
	chen.zhang@intel.com, Hailiang Zhang <zhanghailiang@xfusion.com>,
	Leonardo Bras <leobras@redhat.com>
Subject: Re: [PATCH v4 07/10] migration: split migration_incoming_co
Date: Tue, 2 May 2023 16:48:12 -0400	[thread overview]
Message-ID: <ZFF3DJ9BpFAYEVGV@x1n> (raw)
In-Reply-To: <20230428194928.1426370-8-vsementsov@yandex-team.ru>

On Fri, Apr 28, 2023 at 10:49:25PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Originally, migration_incoming_co was introduced by
> 25d0c16f625feb3b6
>    "migration: Switch to COLO process after finishing loadvm"
> to be able to enter from COLO code to one specific yield point, added
> by 25d0c16f625feb3b6.
> 
> Later in 923709896b1b0
>  "migration: poll the cm event for destination qemu"
> we reused this variable to wake the migration incoming coroutine from
> RDMA code.
> 
> That was doubtful idea. Entering coroutines is a very fragile thing:
> you should be absolutely sure which yield point you are going to enter.
> 
> I don't know how much is it safe to enter during qemu_loadvm_state()
> which I think what RDMA want to do. But for sure RDMA shouldn't enter
> the special COLO-related yield-point. As well, COLO code doesn't want
> to enter during qemu_loadvm_state(), it want to enter it's own specific
> yield-point.
> 
> As well, when in 8e48ac95865ac97d
>  "COLO: Add block replication into colo process" we added
> bdrv_invalidate_cache_all() call (now it's called activate_all())
> it became possible to enter the migration incoming coroutine during
> that call which is wrong too.
> 
> So, let't make these things separate and disjoint: loadvm_co for RDMA,
> non-NULL during qemu_loadvm_state(), and colo_incoming_co for COLO,
> non-NULL only around specific yield.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
>  migration/colo.c      | 4 ++--
>  migration/migration.c | 8 ++++++--
>  migration/migration.h | 9 ++++++++-
>  3 files changed, 16 insertions(+), 5 deletions(-)

The idea looks right to me, but I really know mostly nothing on coroutines
and also rdma+colo..

Is the other ref in rdma.c (rdma_cm_poll_handler()) still missing?

-- 
Peter Xu



  reply	other threads:[~2023-05-02 20:49 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 19:49 [PATCH v4 00/10] COLO: improve build options Vladimir Sementsov-Ogievskiy
2023-04-28 19:49 ` [PATCH v4 01/10] block/meson.build: prefer positive condition for replication Vladimir Sementsov-Ogievskiy
2023-05-04  7:31   ` Zhang, Chen
2023-04-28 19:49 ` [PATCH v4 02/10] colo: make colo_checkpoint_notify static and provide simpler API Vladimir Sementsov-Ogievskiy
2023-05-02 18:24   ` Juan Quintela
2023-05-02 20:58   ` Peter Xu
2023-05-04  7:35   ` Zhang, Chen
2023-04-28 19:49 ` [PATCH v4 03/10] build: move COLO under CONFIG_REPLICATION Vladimir Sementsov-Ogievskiy
2023-05-02 16:41   ` Peter Xu
2023-05-03 22:43     ` Vladimir Sementsov-Ogievskiy
2023-05-09 18:17   ` Juan Quintela
2023-04-28 19:49 ` [PATCH v4 04/10] configure: add --disable-colo-proxy option Vladimir Sementsov-Ogievskiy
2023-05-04  7:45   ` Zhang, Chen
2023-05-09 18:42     ` Juan Quintela
2023-05-10 11:36       ` Vladimir Sementsov-Ogievskiy
2023-05-10 12:18         ` Juan Quintela
2023-05-10 12:48           ` Vladimir Sementsov-Ogievskiy
2023-05-10 13:48             ` Juan Quintela
2023-04-28 19:49 ` [PATCH v4 05/10] migration: drop colo_incoming_thread from MigrationIncomingState Vladimir Sementsov-Ogievskiy
2023-05-02 16:43   ` Peter Xu
2023-05-02 18:19   ` Juan Quintela
2023-05-04  7:46   ` Zhang, Chen
2023-04-28 19:49 ` [PATCH v4 06/10] migration: process_incoming_migration_co: simplify code flow around ret Vladimir Sementsov-Ogievskiy
2023-05-02 16:52   ` Peter Xu
2023-05-02 18:20   ` Juan Quintela
2023-05-04  7:48   ` Zhang, Chen
2023-04-28 19:49 ` [PATCH v4 07/10] migration: split migration_incoming_co Vladimir Sementsov-Ogievskiy
2023-05-02 20:48   ` Peter Xu [this message]
2023-05-03 22:51     ` Vladimir Sementsov-Ogievskiy
2023-05-04  7:51       ` Zhang, Chen
2023-04-28 19:49 ` [PATCH v4 08/10] migration: process_incoming_migration_co(): move colo part to colo Vladimir Sementsov-Ogievskiy
2023-05-02 20:54   ` Peter Xu
2023-05-03  9:15     ` Vladimir Sementsov-Ogievskiy
2023-04-28 19:49 ` [PATCH v4 09/10] migration: disallow change capabilities in COLO state Vladimir Sementsov-Ogievskiy
2023-05-02 20:57   ` Peter Xu
2023-05-04  8:09   ` Zhang, Chen
2023-05-04  8:23     ` Vladimir Sementsov-Ogievskiy
2023-05-04  9:03       ` Zhang, Chen
2023-05-09 18:22         ` Juan Quintela
2023-05-09 18:46   ` Juan Quintela
2023-04-28 19:49 ` [PATCH v4 10/10] migration: block incoming colo when capability is disabled Vladimir Sementsov-Ogievskiy
2023-05-02 20:57   ` Peter Xu
2023-05-04  9:25   ` Zhang, Chen
2023-05-04 22:10   ` Lukas Straub
2023-05-04 22:30     ` Vladimir Sementsov-Ogievskiy
2023-05-04 22:46       ` Lukas Straub
2023-05-05  7:51         ` Zhang, Chen
2023-05-09 18:23   ` Juan Quintela
2023-05-05  7:56 ` [PATCH v4 00/10] COLO: improve build options Zhang, Chen
2023-05-05  8:21   ` Vladimir Sementsov-Ogievskiy

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=ZFF3DJ9BpFAYEVGV@x1n \
    --to=peterx@redhat.com \
    --cc=chen.zhang@intel.com \
    --cc=leobras@redhat.com \
    --cc=lukasstraub2@web.de \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --cc=zhanghailiang@xfusion.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).