qemu-patch-raspberry4/migration
Dr. David Alan Gilbert 371ff5a3f0 Inhibit ballooning during postcopy
Postcopy detects accesses to pages that haven't been transferred yet
using userfaultfd, and it causes exceptions on pages that are 'not
present'.
Ballooning also causes pages to be marked as 'not present' when the
guest inflates the balloon.
Potentially a balloon could be inflated to discard pages that are
currently inflight during postcopy and that may be arriving at about
the same time.

To avoid this confusion, disable ballooning during postcopy.

When disabled we drop balloon requests from the guest.  Since ballooning
is generally initiated by the host, the management system should avoid
initiating any balloon instructions to the guest during migration,
although it's not possible to know how long it would take a guest to
process a request made prior to the start of migration.
Guest initiated ballooning will not know if it's really freed a page
of host memory or not.

Queueing the requests until after migration would be nice, but is
non-trivial, since the set of inflate/deflate requests have to
be compared with the state of the page to know what the final
outcome is allowed to be.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-10 15:00:28 +01:00
..
block.c Modify save_live_pending for postcopy 2015-11-10 15:00:26 +01:00
exec.c Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler 2015-06-12 13:26:21 +01:00
fd.c Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler 2015-06-12 13:26:21 +01:00
Makefile.objs postcopy: OS support test 2015-11-10 15:00:26 +01:00
migration.c End of migration for postcopy 2015-11-10 15:00:28 +01:00
postcopy-ram.c Inhibit ballooning during postcopy 2015-11-10 15:00:28 +01:00
qemu-file-buf.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
qemu-file-internal.h Split struct QEMUFile out 2014-12-16 17:47:36 +05:30
qemu-file-stdio.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
qemu-file-unix.c Return path: socket_writev_buffer: Block even on non-blocking fd's 2015-11-10 15:00:25 +01:00
qemu-file.c Return path: Open a return path on QEMUFile for sockets 2015-11-10 14:51:49 +01:00
ram.c Host page!=target page: Cleanup bitmaps 2015-11-10 15:00:28 +01:00
rdma.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
savevm.c Postcopy: Mark nohugepage before discard 2015-11-10 15:00:28 +01:00
tcp.c Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler 2015-06-12 13:26:21 +01:00
unix.c Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler 2015-06-12 13:26:21 +01:00
vmstate.c vmstate: Create optional sections 2015-07-07 14:54:52 +02:00
xbzrle.c Start migrating migration code into a migration directory 2014-12-16 17:47:36 +05:30