qemu/migration
Leonardo Bras 10351fbad1 migration/multifd: Join all multifd threads in order to avoid leaks
Current approach will only join threads that are still running.

For the threads not joined, resources or private memory are always kept in
the process space and never reclaimed before process end, and this risks
serious memory leaks.

This should usually not represent a big problem, since multifd migration
is usually just ran at most a few times, and after it succeeds there is
not much to be done before exiting the process.

Yet still, it should not hurt performance to join all of them.

Fixes: b5eea99ec2 ("migration: Add yank feature")
Reported-by: Li Xiaohui <xiaohli@redhat.com>
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2023-02-13 03:45:34 +01:00
..
block-dirty-bitmap.c migration: Remove unused threshold_size parameter 2023-02-06 19:22:56 +01:00
block.c migration: Remove unused threshold_size parameter 2023-02-06 19:22:56 +01:00
block.h migration: disable auto-converge during bulk block migration 2017-09-27 11:27:14 +01:00
channel-block.c io: Add support for MSG_PEEK for socket channel 2023-02-06 19:22:56 +01:00
channel-block.h migration: introduce a QIOChannel impl for BlockDriverState VMState 2022-06-22 19:33:43 +01:00
channel.c migration: check magic value for deciding the mapping of channels 2023-02-06 19:22:57 +01:00
channel.h migration: check magic value for deciding the mapping of channels 2023-02-06 19:22:57 +01:00
colo-failover.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
colo.c qapi migration: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
dirtyrate.c migration/dirtyrate: Show sample pages only in page-sampling mode 2023-02-06 19:22:56 +01:00
dirtyrate.h migration/dirtyrate: Refactor dirty page rate calculation 2022-07-20 12:15:08 +01:00
exec.c migration: unify incoming processing 2018-07-10 12:48:53 +01:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c monitor: Use getter/setter functions for cur_mon 2020-10-09 07:08:19 +02:00
fd.h migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
global_state.c migration: Silence compiler warning in global_state_store_running() 2020-10-02 12:28:48 +01:00
meson.build migration: Introduce interface query-migrationthreads 2023-02-06 19:22:57 +01:00
migration-hmp-cmds.c migration: Move HMP commands from monitor/ to migration/ 2023-02-04 07:56:54 +01:00
migration.c migration/multifd: Change multifd_load_cleanup() signature and usage 2023-02-13 03:44:44 +01:00
migration.h migration: Postpone postcopy preempt channel to be after main 2023-02-11 16:51:09 +01:00
multifd-zlib.c multifd: Create page_size fields into both MultiFD{Recv,Send}Params 2022-12-15 10:30:37 +01:00
multifd-zstd.c multifd: Create page_size fields into both MultiFD{Recv,Send}Params 2022-12-15 10:30:37 +01:00
multifd.c migration/multifd: Join all multifd threads in order to avoid leaks 2023-02-13 03:45:34 +01:00
multifd.h migration/multifd: Change multifd_load_cleanup() signature and usage 2023-02-13 03:44:44 +01:00
page_cache.c migration: Fix cache_init()'s "Failed to allocate" error messages 2021-02-08 11:19:51 +00:00
page_cache.h migration: Clean up signed vs. unsigned XBZRLE cache-size 2021-02-08 11:19:51 +00:00
postcopy-ram.c migration: Postpone postcopy preempt channel to be after main 2023-02-11 16:51:09 +01:00
postcopy-ram.h migration: Postpone postcopy preempt channel to be after main 2023-02-11 16:51:09 +01:00
qemu-file.c migration: Fix race on qemu_file_shutdown() 2022-11-21 11:58:10 +01:00
qemu-file.h migration: Postcopy recover with preempt enabled 2022-07-20 12:15:08 +01:00
ram.c AVX512 support for xbzrle_encode_buffer 2023-02-11 16:51:09 +01:00
ram.h migration: Use atomic ops properly for page accountings 2022-12-15 10:30:37 +01:00
rdma.c io: Add support for MSG_PEEK for socket channel 2023-02-06 19:22:56 +01:00
rdma.h migration: Export rdma.c functions in its own file 2017-06-01 18:49:23 +02:00
savevm.c migration: Postpone postcopy preempt channel to be after main 2023-02-11 16:51:09 +01:00
savevm.h migration: Remove unused threshold_size parameter 2023-02-06 19:22:56 +01:00
socket.c migration: Postcopy preemption preparation on channel creation 2022-07-20 12:15:08 +01:00
socket.h migration: Postcopy preemption preparation on channel creation 2022-07-20 12:15:08 +01:00
target.c migration: Move populate_vfio_info() into a separate file 2021-05-14 12:31:51 +02:00
threadinfo.c migration: Introduce interface query-migrationthreads 2023-02-06 19:22:57 +01:00
threadinfo.h migration: Introduce interface query-migrationthreads 2023-02-06 19:22:57 +01:00
tls.c cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
tls.h migration: Add helpers to detect TLS capability 2022-07-20 12:15:08 +01:00
trace-events migration: Remove unused threshold_size parameter 2023-02-06 19:22:56 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vmstate-types.c Move CPU softfloat unions to cpu-float.h 2022-04-06 14:31:43 +02:00
vmstate.c migration: Add canary to VMSTATE_END_OF_LIST 2023-02-06 19:22:56 +01:00
xbzrle.c AVX512 support for xbzrle_encode_buffer 2023-02-11 16:51:09 +01:00
xbzrle.h AVX512 support for xbzrle_encode_buffer 2023-02-11 16:51:09 +01:00
yank_functions.c migration: Move the yank unregister of channel_close out 2021-07-26 12:45:03 +01:00
yank_functions.h migration: Move the yank unregister of channel_close out 2021-07-26 12:45:03 +01:00