[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 19/23] migration/multifd: Prepare multifd sync for mapped-
From: |
Peter Xu |
Subject: |
Re: [PATCH v6 19/23] migration/multifd: Prepare multifd sync for mapped-ram migration |
Date: |
Fri, 1 Mar 2024 09:45:11 +0800 |
On Thu, Feb 29, 2024 at 12:30:13PM -0300, Fabiano Rosas wrote:
> The mapped-ram migration can be performed live or non-live, but it is
> always asynchronous, i.e. the source machine and the destination
> machine are not migrating at the same time. We only need some pieces
> of the multifd sync operations.
>
> multifd_send_sync_main()
> ------------------------
> Issued by the ram migration code on the migration thread, causes the
> multifd send channels to synchronize with the migration thread and
> makes the sending side emit a packet with the MULTIFD_FLUSH flag.
>
> With mapped-ram we want to maintain the sync on the sending side
> because that provides ordering between the rounds of dirty pages when
> migrating live.
>
> MULTIFD_FLUSH
> -------------
> On the receiving side, the presence of the MULTIFD_FLUSH flag on a
> packet causes the receiving channels to start synchronizing with the
> main thread.
>
> We're not using packets with mapped-ram, so there's no MULTIFD_FLUSH
> flag and therefore no channel sync on the receiving side.
>
> multifd_recv_sync_main()
> ------------------------
> Issued by the migration thread when the ram migration flag
> RAM_SAVE_FLAG_MULTIFD_FLUSH is received, causes the migration thread
> on the receiving side to start synchronizing with the recv
> channels. Due to compatibility, this is also issued when
> RAM_SAVE_FLAG_EOS is received.
>
> For mapped-ram we only need to synchronize the channels at the end of
> migration to avoid doing cleanup before the channels have finished
> their IO.
>
> Make sure the multifd syncs are only issued at the appropriate times.
>
> Note that due to pre-existing backward compatibility issues, we have
> the multifd_flush_after_each_section property that can cause a sync to
> happen at EOS. Since the EOS flag is needed on the stream, allow
> mapped-ram to just ignore it.
>
> Also emit an error if any other unexpected flags are found on the
> stream.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
- [PATCH v6 11/23] tests/qtest/migration: Add tests for mapped-ram file-based migration, (continued)
- [PATCH v6 11/23] tests/qtest/migration: Add tests for mapped-ram file-based migration, Fabiano Rosas, 2024/02/29
- [PATCH v6 13/23] migration/multifd: Decouple recv method from pages, Fabiano Rosas, 2024/02/29
- [PATCH v6 12/23] migration/multifd: Rename MultiFDSend|RecvParams::data to compress_data, Fabiano Rosas, 2024/02/29
- [PATCH v6 14/23] migration/multifd: Allow multifd without packets, Fabiano Rosas, 2024/02/29
- [PATCH v6 17/23] migration/multifd: Add outgoing QIOChannelFile support, Fabiano Rosas, 2024/02/29
- [PATCH v6 15/23] migration/multifd: Allow receiving pages without packets, Fabiano Rosas, 2024/02/29
- [PATCH v6 16/23] migration/multifd: Add a wrapper for channels_created, Fabiano Rosas, 2024/02/29
- [PATCH v6 18/23] migration/multifd: Add incoming QIOChannelFile support, Fabiano Rosas, 2024/02/29
- [PATCH v6 19/23] migration/multifd: Prepare multifd sync for mapped-ram migration, Fabiano Rosas, 2024/02/29
- Re: [PATCH v6 19/23] migration/multifd: Prepare multifd sync for mapped-ram migration,
Peter Xu <=
- [PATCH v6 20/23] migration/multifd: Support outgoing mapped-ram stream format, Fabiano Rosas, 2024/02/29
- [PATCH v6 21/23] migration/multifd: Support incoming mapped-ram stream format, Fabiano Rosas, 2024/02/29
- [PATCH v6 23/23] tests/qtest/migration: Add a multifd + mapped-ram migration test, Fabiano Rosas, 2024/02/29
- [PATCH v6 22/23] migration/multifd: Add mapped-ram support to fd: URI, Fabiano Rosas, 2024/02/29
- Re: [PATCH v6 00/23] migration: File based migration with multifd and mapped-ram, Peter Xu, 2024/02/29