migration/multifd: Allow receiving pages without packets
authorFabiano Rosas <farosas@suse.de>
Thu, 29 Feb 2024 15:30:09 +0000 (12:30 -0300)
committerPeter Xu <peterx@redhat.com>
Fri, 1 Mar 2024 07:42:04 +0000 (15:42 +0800)
commitd117ed0699d4117e75b67d76d9678785c676e21c
tree07b27fc2950cb658b1f80a4f900e4a7e3536bb23
parent06833d83f8978139395da0f1d6a9fad81b9dd024
migration/multifd: Allow receiving pages without packets

Currently multifd does not need to have knowledge of pages on the
receiving side because all the information needed is within the
packets that come in the stream.

We're about to add support to mapped-ram migration, which cannot use
packets because it expects the ramblock section in the migration file
to contain only the guest pages data.

Add a data structure to transfer pages between the ram migration code
and the multifd receiving threads.

We don't want to reuse MultiFDPages_t for two reasons:

a) multifd threads don't really need to know about the data they're
   receiving.

b) the receiving side has to be stopped to load the pages, which means
   we can experiment with larger granularities than page size when
   transferring data.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240229153017.2221-16-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/file.c
migration/multifd.c
migration/multifd.h