[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/7] migration/multifd: Allow to sync with sender threads
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH v3 2/7] migration/multifd: Allow to sync with sender threads only |
Date: |
Mon, 09 Dec 2024 17:52:13 -0300 |
Peter Xu <peterx@redhat.com> writes:
> Teach multifd_send_sync_main() to sync with threads only.
>
> We already have such requests, which is when mapped-ram is enabled with
> multifd. In that case, no SYNC messages will be pushed to the stream when
> multifd syncs the sender threads because there's no destination threads
> waiting for that. The whole point of the sync is to make sure all threads
> finished their jobs.
>
> So fundamentally we have a request to do the sync in different ways:
>
> - Either to sync the threads only,
> - Or to sync the threads but also with the destination side.
>
> Mapped-ram did it already because of the use_packet check in the sync
> handler of the sender thread. It works.
>
> However it may stop working when e.g. VFIO may start to reuse multifd
> channels to push device states. In that case VFIO has similar request on
> "thread-only sync" however we can't check a flag because such sync request
> can still come from RAM which needs the on-wire notifications.
>
> Paving way for that by allowing the multifd_send_sync_main() to specify
> what kind of sync the caller needs. We can use it for mapped-ram already.
>
> No functional change intended.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
- [PATCH v3 0/7] migration/multifd: Some VFIO / postcopy preparations on flush, Peter Xu, 2024/12/06
- [PATCH v3 1/7] migration/multifd: Further remove the SYNC on complete, Peter Xu, 2024/12/06
- [PATCH v3 3/7] migration/ram: Move RAM_SAVE_FLAG* into ram.h, Peter Xu, 2024/12/06
- [PATCH v3 4/7] migration/multifd: Unify RAM_SAVE_FLAG_MULTIFD_FLUSH messages, Peter Xu, 2024/12/06
- [PATCH v3 2/7] migration/multifd: Allow to sync with sender threads only, Peter Xu, 2024/12/06
- Re: [PATCH v3 2/7] migration/multifd: Allow to sync with sender threads only,
Fabiano Rosas <=
- [PATCH v3 5/7] migration/multifd: Remove sync processing on postcopy, Peter Xu, 2024/12/06
- [PATCH v3 6/7] migration/multifd: Cleanup src flushes on condition check, Peter Xu, 2024/12/06
- [PATCH v3 7/7] migration/multifd: Document the reason to sync for save_setup(), Peter Xu, 2024/12/06
- Re: [PATCH v3 0/7] migration/multifd: Some VFIO / postcopy preparations on flush, Fabiano Rosas, 2024/12/17