qemu-patch-raspberry4/migration
Liang Li 73a8912b8a migration: Fix multi-thread compression bug
Recently, a bug related to multiple thread compression feature for
live migration is reported. The destination side will be blocked
during live migration if there are heavy workload in host and
memory intensive workload in guest, this is most likely to happen
when there is one decompression thread.

Some parts of the decompression code are incorrect:
1. The main thread receives data from source side will enter a busy
loop to wait for a free decompression thread.
2. A lock is needed to protect the decomp_param[idx]->start, because
it is checked in the main thread and is updated in the decompression
thread.

Fix these two issues by following the code pattern for compression.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Reported-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Daniel P. Berrange <berrange@redhat.com>

Signed-off-by: Liang Li <liang.z.li@intel.com>
Message-Id: <1462433579-13691-2-git-send-email-liang.z.li@intel.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2016-06-17 18:24:01 +05:30
..
block.c migration/block: Convert saving to BlockBackend 2016-06-08 10:21:08 +02:00
exec.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
fd.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
Makefile.objs migration: add support for encrypting data with TLS 2016-05-26 11:32:13 +05:30
migration.c migration: Don't use *_to_cpup() and cpu_to_*w() 2016-06-17 18:23:49 +05:30
postcopy-ram.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
qemu-file-channel.c migration: introduce a new QEMUFile impl based on QIOChannel 2016-05-26 11:31:24 +05:30
qemu-file.c migration: remove qemu_get_fd method from QEMUFile 2016-05-26 11:32:21 +05:30
qjson.c migration/qjson: Drop gratuitous use of QOM 2016-05-23 14:16:12 +05:30
ram.c migration: Fix multi-thread compression bug 2016-06-17 18:24:01 +05:30
rdma.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
savevm.c migration: fix inability to save VM after snapshot 2016-06-17 18:23:57 +05:30
socket.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
tls.c migration: rename functions to starting migrations 2016-06-16 09:51:37 +05:30
vmstate.c migration: Trace improvements 2016-06-17 18:23:53 +05:30
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00