mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 07:32:06 -06:00
migration: Don't create decompression threads if not enabled
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> -- I removed the [HACK] part because previous patch just check that compression pages are not received.
This commit is contained in:
parent
edc60127e4
commit
3416ab5bb4
1 changed files with 6 additions and 0 deletions
|
@ -2234,6 +2234,9 @@ void migrate_decompress_threads_create(void)
|
||||||
{
|
{
|
||||||
int i, thread_count;
|
int i, thread_count;
|
||||||
|
|
||||||
|
if (!migrate_use_compression()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
thread_count = migrate_decompress_threads();
|
thread_count = migrate_decompress_threads();
|
||||||
decompress_threads = g_new0(QemuThread, thread_count);
|
decompress_threads = g_new0(QemuThread, thread_count);
|
||||||
decomp_param = g_new0(DecompressParam, thread_count);
|
decomp_param = g_new0(DecompressParam, thread_count);
|
||||||
|
@ -2255,6 +2258,9 @@ void migrate_decompress_threads_join(void)
|
||||||
{
|
{
|
||||||
int i, thread_count;
|
int i, thread_count;
|
||||||
|
|
||||||
|
if (!migrate_use_compression()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
thread_count = migrate_decompress_threads();
|
thread_count = migrate_decompress_threads();
|
||||||
for (i = 0; i < thread_count; i++) {
|
for (i = 0; i < thread_count; i++) {
|
||||||
qemu_mutex_lock(&decomp_param[i].mutex);
|
qemu_mutex_lock(&decomp_param[i].mutex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue