On 26.11.2024 21:52, Fabiano Rosas wrote:
"Maciej S. Szmigiero" <m...@maciej.szmigiero.name> writes:
From: "Maciej S. Szmigiero" <maciej.szmigi...@oracle.com>
Currently, ram_save_complete() sends a final SYNC multifd packet near this
function end, after sending all of the remaining RAM data.
On the receive side, this SYNC packet will cause multifd channel threads
to block, waiting for the final sem_sync posting in
multifd_recv_terminate_threads().
However, multifd_recv_terminate_threads() won't be called until the
migration is complete, which causes a problem if multifd channels are
still required for transferring device state data after RAM transfer is
complete but before finishing the migration process.
Defer sending the final SYNC packet to the end of sending of
post-switchover iterable data instead if device state transfer is possible.
Signed-off-by: Maciej S. Szmigiero <maciej.szmigi...@oracle.com>
Reviewed-by: Fabiano Rosas <faro...@suse.de>
I wonder whether we could just defer the sync for the !device_state case
as well.
AFAIK this should work, just wanted to be extra cautious with bit
stream timing changes in case there's for example some race in an
older QEMU version.
Thanks,
Maciej