[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/5] migration: Don't create decompression threads if
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 5/5] migration: Don't create decompression threads if not enabled |
Date: |
Wed, 14 Jun 2017 13:51:38 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
--
I removed the [HACK] part because previous patch just check that
compression pages are not received.
---
migration/ram.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index 09b483c..0baa1e0 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2234,6 +2234,9 @@ void migrate_decompress_threads_create(void)
{
int i, thread_count;
+ if (!migrate_use_compression()) {
+ return;
+ }
thread_count = migrate_decompress_threads();
decompress_threads = g_new0(QemuThread, thread_count);
decomp_param = g_new0(DecompressParam, thread_count);
@@ -2255,6 +2258,9 @@ void migrate_decompress_threads_join(void)
{
int i, thread_count;
+ if (!migrate_use_compression()) {
+ return;
+ }
thread_count = migrate_decompress_threads();
for (i = 0; i < thread_count; i++) {
qemu_mutex_lock(&decomp_param[i].mutex);
--
2.9.4
- Re: [Qemu-devel] [PULL 0/5] Migration pull request, Peter Maydell, 2017/06/01
- [Qemu-devel] [PULL 0/5] Migration PULL request, Juan Quintela, 2017/06/14
- [Qemu-devel] [PULL 1/5] migration: Fix compilation with older compilers, Juan Quintela, 2017/06/14
- [Qemu-devel] [PULL 2/5] migration: fix incorrect enable return path, Juan Quintela, 2017/06/14
- [Qemu-devel] [PULL 3/5] migration: Remove unneeded includes, Juan Quintela, 2017/06/14
- [Qemu-devel] [PULL 5/5] migration: Don't create decompression threads if not enabled,
Juan Quintela <=
- [Qemu-devel] [PULL 4/5] migration: Test for disabled features on reception, Juan Quintela, 2017/06/14
- Re: [Qemu-devel] [PULL 0/5] Migration PULL request, Peter Maydell, 2017/06/15