qemu-e2k/migration
Ivan Ren 713f762a31 migration: fix migrate_cancel leads live_migration thread endless loop
When we 'migrate_cancel' a multifd migration, live_migration thread may
go into endless loop in multifd_send_pages functions.

Reproduce steps:

(qemu) migrate_set_capability multifd on
(qemu) migrate -d url
(qemu) [wait a while]
(qemu) migrate_cancel

Then may get live_migration 100% cpu usage in following stack:

pthread_mutex_lock
qemu_mutex_lock_impl
multifd_send_pages
multifd_queue_page
ram_save_multifd_page
ram_save_target_page
ram_save_host_page
ram_find_and_save_block
ram_find_and_save_block
ram_save_iterate
qemu_savevm_state_iterate
migration_iteration_run
migration_thread
qemu_thread_start
start_thread
clone

Signed-off-by: Ivan Ren <ivanren@tencent.com>
Message-Id: <1561468699-9819-2-git-send-email-ivanren@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2019-07-24 14:46:51 +02:00
..
block-dirty-bitmap.c
block.c
block.h
channel.c
channel.h
colo-failover.c
colo.c migration/colo.c: Add missed filter notify for Xen COLO. 2019-07-02 10:21:07 +08:00
exec.c
exec.h
fd.c
fd.h
global_state.c
Makefile.objs
migration.c migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
migration.h migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
page_cache.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
page_cache.h
postcopy-ram.c general: Replace global smp variables with smp machine properties 2019-07-05 17:07:36 -03:00
postcopy-ram.h
qemu-file-channel.c
qemu-file-channel.h
qemu-file.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-file.h
qjson.c
qjson.h
ram.c migration: fix migrate_cancel leads live_migration thread endless loop 2019-07-24 14:46:51 +02:00
ram.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
rdma.c migration: move port_attr inside CONFIG_LINUX 2019-07-04 19:23:07 +01:00
rdma.h
savevm.c migration/postcopy: remove redundant cpu_synchronize_all_post_init 2019-07-15 15:45:59 +02:00
savevm.h
socket.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
socket.h
tls.c
tls.h
trace-events migration: Split log_clear() into smaller chunks 2019-07-15 15:39:03 +02:00
vmstate-types.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vmstate.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xbzrle.c
xbzrle.h