I'm putting this RFC out early so we can discuss the issues around the
SYNC packet of the multifd protocol. There's a related series posted
by Elena Ufimtseva:
https://lore.kernel.org/r/20230922065625.21848-1-elena.ufimtseva@oracle.com
My interest in this (aside from correctness) is that when doing the
(upcoming) fixed-ram[1] migration, I would like to have multifd ignore
the concept of packets altogether, since the file: migration is not
synchronous.
The main problem I hit is that multifd (ab)uses the knowledge that a
sync packet is sent after a batch of pages and relies (perhaps
inadvertently) on the last post to sem_sync to finish the
migration. Which means that without the sync, the main thread just
rushes and does cleanup while packets are still in flight.
I have add another patch to this series that introduces a
multifd-nopackets option (placeholder name), but it's probably too
early to discuss that so I'm leaving it out.
1- https://lore.kernel.org/r/20230330180336.2791-1-farosas@suse.de
Fabiano Rosas (3):
migration/multifd: Move channels_ready semaphore
migration/multifd: Decouple control flow from the SYNC packet
migration/multifd: Extract sem_done waiting into a function
migration/multifd.c | 97 +++++++++++++++++++++++++-----------------
migration/multifd.h | 8 ++--
migration/trace-events | 2 +-
3 files changed, 63 insertions(+), 44 deletions(-)
--
2.35.3