mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration: Make compression_threads use save/load_setup/cleanup()
Once there, be consistent and use compress_thread_{save,load}_{setup,cleanup}. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170628095228.4661-6-quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
f265e0e437
commit
f0afa331ce
3 changed files with 8 additions and 14 deletions
|
@ -306,7 +306,7 @@ static inline void terminate_compression_threads(void)
|
|||
}
|
||||
}
|
||||
|
||||
void migrate_compress_threads_join(void)
|
||||
static void compress_threads_save_cleanup(void)
|
||||
{
|
||||
int i, thread_count;
|
||||
|
||||
|
@ -329,7 +329,7 @@ void migrate_compress_threads_join(void)
|
|||
comp_param = NULL;
|
||||
}
|
||||
|
||||
void migrate_compress_threads_create(void)
|
||||
static void compress_threads_save_setup(void)
|
||||
{
|
||||
int i, thread_count;
|
||||
|
||||
|
@ -1390,6 +1390,7 @@ static void ram_save_cleanup(void *opaque)
|
|||
}
|
||||
XBZRLE_cache_unlock();
|
||||
migration_page_queue_free(*rsp);
|
||||
compress_threads_save_cleanup();
|
||||
g_free(*rsp);
|
||||
*rsp = NULL;
|
||||
}
|
||||
|
@ -1923,6 +1924,7 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
|
|||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
compress_threads_save_setup();
|
||||
|
||||
ram_control_before_iterate(f, RAM_CONTROL_SETUP);
|
||||
ram_control_after_iterate(f, RAM_CONTROL_SETUP);
|
||||
|
@ -2231,7 +2233,7 @@ static void wait_for_decompress_done(void)
|
|||
qemu_mutex_unlock(&decomp_done_lock);
|
||||
}
|
||||
|
||||
void migrate_decompress_threads_create(void)
|
||||
static void compress_threads_load_setup(void)
|
||||
{
|
||||
int i, thread_count;
|
||||
|
||||
|
@ -2255,7 +2257,7 @@ void migrate_decompress_threads_create(void)
|
|||
}
|
||||
}
|
||||
|
||||
void migrate_decompress_threads_join(void)
|
||||
static void compress_threads_load_cleanup(void)
|
||||
{
|
||||
int i, thread_count;
|
||||
|
||||
|
@ -2321,12 +2323,14 @@ static void decompress_data_with_multi_threads(QEMUFile *f,
|
|||
static int ram_load_setup(QEMUFile *f, void *opaque)
|
||||
{
|
||||
xbzrle_load_setup();
|
||||
compress_threads_load_setup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ram_load_cleanup(void *opaque)
|
||||
{
|
||||
xbzrle_load_cleanup();
|
||||
compress_threads_load_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue