qemu-e2k/migration
Daniel Henrique Barboza ee555cdf4d migration/savevm.c: set MAX_VM_CMD_PACKAGED_SIZE to 1ul << 32
MAX_VM_CMD_PACKAGED_SIZE is a constant used in qemu_savevm_send_packaged
and loadvm_handle_cmd_packaged to determine whether a package is too
big to be sent or received. qemu_savevm_send_packaged is called inside
postcopy_start (migration/migration.c) to send the MigrationState
in a single blob to the destination, using the MIG_CMD_PACKAGED subcommand,
which will read it up using loadvm_handle_cmd_packaged. If the blob is
larger than MAX_VM_CMD_PACKAGED_SIZE, an error is thrown and the postcopy
migration is aborted. Both MAX_VM_CMD_PACKAGED_SIZE and MIG_CMD_PACKAGED
were introduced by commit 11cf1d984b ("MIG_CMD_PACKAGED: Send a packaged
chunk ..."). The constant has its original value of 1ul << 24 (16MB).

The current MAX_VM_CMD_PACKAGED_SIZE value is not enough to support postcopy
migration of bigger pseries guests. The blob size for a postcopy migration of
a pseries guest with the following setup:

qemu-system-ppc64 --nographic -vga none -machine pseries,accel=kvm -m 64G \
-smp 1,maxcpus=32 -device virtio-blk-pci,drive=rootdisk \
-drive file=f27.qcow2,if=none,cache=none,format=qcow2,id=rootdisk \
-netdev user,id=u1 -net nic,netdev=u1

Goes around 12MB. Bumping the RAM to 128G makes the blob sizes goes to 20MB.
With 256G the blob goes to 37MB - more than twice the current maximum size.
At this moment the pseries machine can handle guests with up to 1TB of RAM,
making this postcopy blob goes to 128MB of size approximately.

Following the discussions made in [1], there is a need to understand what
devices are aggressively consuming the blob in that manner and see if that
can be mitigated. Until then, we can set MAX_VM_CMD_PACKAGED_SIZE to the
maximum value allowed. Since the size is a 32 bit int variable, we can set
it as 1ul << 32, giving a maximum blob size of 4G that is enough to support
postcopy migration of 32TB RAM guests given the above constraints.

[1] https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg06313.html

Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Reported-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-02-06 10:55:13 +00:00
..
Makefile.objs buildsys: Move rdma libs to per object 2017-09-22 10:20:34 +08:00
block.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01: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 qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
colo.c qapi: Mechanically convert FOO_lookup[...] to FOO_str(...) 2017-09-04 13:09:13 +02:00
exec.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00: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
migration.c migration: Allow migrate_fd_connect to take an Error * 2018-02-06 10:55:12 +00:00
migration.h migration: Allow migrate_fd_connect to take an Error * 2018-02-06 10:55:12 +00: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: Revert postcopy-blocktime commit set 2018-01-23 10:08:05 +00:00
postcopy-ram.h migration: postcopy_place_page factoring out 2017-10-23 18:03:39 +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: Remove unneeded includes 2017-06-14 11:10:19 +02:00
qemu-file.h migration: ram_control_* are implemented in qemu_file 2017-06-13 11:00:45 +02:00
qjson.c migration: Move qjson.h to migration/ 2017-05-18 19:20:59 +02:00
qjson.h migration: Move qjson.h to migration/ 2017-05-18 19:20:59 +02:00
ram.c migration: Guard ram_bytes_remaining against early call 2018-01-15 12:48:04 +01:00
ram.h migration: No need to return the size of the cache 2017-10-29 14:06:15 +01: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/savevm.c: set MAX_VM_CMD_PACKAGED_SIZE to 1ul << 32 2018-02-06 10:55:13 +00:00
savevm.h migration: Create load_setup()/cleanup() methods 2017-07-10 17:52:21 +01:00
socket.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
socket.h migration: Export socket.c functions in its own file 2017-06-01 18:49:23 +02:00
tls.c migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
tls.h migration: Export tls.c functions in its own file 2017-06-01 18:49:23 +02:00
trace-events migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00: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