qemu-patch-raspberry4/migration
Peter Xu edd090c728 migration: synchronize dirty bitmap for resume
This patch implements the first part of core RAM resume logic for
postcopy. ram_resume_prepare() is provided for the work.

When the migration is interrupted by network failure, the dirty bitmap
on the source side will be meaningless, because even the dirty bit is
cleared, it is still possible that the sent page was lost along the way
to destination. Here instead of continue the migration with the old
dirty bitmap on source, we ask the destination side to send back its
received bitmap, then invert it to be our initial dirty bitmap.

The source side send thread will issue the MIG_CMD_RECV_BITMAP requests,
once per ramblock, to ask for the received bitmap. On destination side,
MIG_RP_MSG_RECV_BITMAP will be issued, along with the requested bitmap.
Data will be received on the return-path thread of source, and the main
migration thread will be notified when all the ramblock bitmaps are
synchronized.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180502104740.12123-17-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2018-05-15 20:56:57 +02:00
..
block-dirty-bitmap.c migration/block-dirty-bitmap: fix memory leak in dirty_bitmap_load_bits 2018-05-04 08:23:26 -05:00
block.c migration/block: compare only read blocks against the rate limiter 2018-03-23 16:45:18 +00:00
block.h migration: disable auto-converge during bulk block migration 2017-09-27 11:27:14 +01:00
channel.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
channel.h migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
colo-comm.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
colo-failover.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
colo.c Include less of the generated modular QAPI headers 2018-03-02 13:45:50 -06:00
exec.c migration: let incoming side use thread context 2018-05-15 20:24:27 +02:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c migration: let incoming side use thread context 2018-05-15 20:24:27 +02:00
fd.h migration: Export fd.c functions in its own file 2017-06-01 18:49:22 +02:00
global_state.c migration: pre_save return int 2017-09-27 11:35:59 +01:00
Makefile.objs migration: add postcopy migration of dirty bitmaps 2018-03-13 17:06:09 -04:00
migration.c migration: synchronize dirty bitmap for resume 2018-05-15 20:56:57 +02:00
migration.h migration: synchronize dirty bitmap for resume 2018-05-15 20:56:57 +02:00
page_cache.c migration: Make sure that we pass the right cache size 2017-10-29 14:06:15 +01:00
page_cache.h migration: Make cache_init() take an error parameter 2017-10-23 18:03:25 +02:00
postcopy-ram.c migration: allow fault thread to pause 2018-05-15 20:24:27 +02:00
postcopy-ram.h vhost+postcopy: Wire up POSTCOPY_END notify 2018-03-20 16:40:37 +02:00
qemu-file-channel.c migration: Split qemu-file.h 2017-06-01 18:49:22 +02:00
qemu-file-channel.h migration: Export qemu-file-channel.c functions in its own file 2017-05-18 19:20:50 +02:00
qemu-file.c migration: detect compression and decompression errors 2018-04-25 18:04:08 +01:00
qemu-file.h migration: stop compression to allocate and free memory frequently 2018-04-25 18:04:06 +01:00
qjson.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
qjson.h migration: Move qjson.h to migration/ 2017-05-18 19:20:59 +02:00
ram.c migration: synchronize dirty bitmap for resume 2018-05-15 20:56:57 +02:00
ram.h migration: new message MIG_RP_MSG_RECV_BITMAP 2018-05-15 20:56:51 +02:00
rdma.c migration: Allow migrate_fd_connect to take an Error * 2018-02-06 10:55:12 +00:00
rdma.h migration: Export rdma.c functions in its own file 2017-06-01 18:49:23 +02:00
savevm.c migration: introduce SaveVMHandlers.resume_prepare 2018-05-15 20:56:55 +02:00
savevm.h migration: introduce SaveVMHandlers.resume_prepare 2018-05-15 20:56:55 +02:00
socket.c migration: let incoming side use thread context 2018-05-15 20:24:27 +02:00
socket.h migration: Export functions to create send channels 2018-05-15 20:24:27 +02:00
tls.c qio: non-default context for TLS handshake 2018-03-06 10:19:07 +00:00
tls.h migration: Export tls.c functions in its own file 2017-06-01 18:49:23 +02:00
trace-events migration: synchronize dirty bitmap for resume 2018-05-15 20:56:57 +02:00
vmstate-types.c migration: Route more error paths 2017-09-27 11:44:18 +01:00
vmstate.c migration: wire vmstate_save_state errors up to vmstate_subsection_save 2017-09-27 11:38:21 +01:00
xbzrle.c migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00
xbzrle.h migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00