Browse Source

Call colo_release_ram_cache() after multifd threads terminate

The multifd threads still may access the colo cache, so release it
only after they terminate.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Link: https://lore.kernel.org/qemu-devel/20260302-colo_unit_test_multifd-v11-9-d653fb3b1d80@web.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
master
Lukas Straub 5 months ago
committed by Fabiano Rosas
parent
commit
64df66fe8c
  1. 3
      migration/colo.c
  2. 3
      migration/migration.c

3
migration/colo.c

@ -949,7 +949,4 @@ void coroutine_fn colo_incoming_co(void)
/* Wait checkpoint incoming thread exit before free resource */ /* Wait checkpoint incoming thread exit before free resource */
qemu_thread_join(&th); qemu_thread_join(&th);
bql_lock(); bql_lock();
/* We hold the global BQL, so it is safe here */
colo_release_ram_cache();
} }

3
migration/migration.c

@ -454,6 +454,9 @@ void migration_incoming_state_destroy(void)
* BQL and retake unconditionally. * BQL and retake unconditionally.
*/ */
assert(bql_locked()); assert(bql_locked());
if (migrate_colo()) {
colo_release_ram_cache();
}
qemu_loadvm_state_cleanup(mis); qemu_loadvm_state_cleanup(mis);
if (mis->to_src_file) { if (mis->to_src_file) {

Loading…
Cancel
Save