[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/18] migration: Simplify decompress_data_with_multi_threads()
From: |
Juan Quintela |
Subject: |
[PATCH 13/18] migration: Simplify decompress_data_with_multi_threads() |
Date: |
Tue, 13 Jun 2023 16:57:52 +0200 |
Doing a break to do another break is just confused. Just call return
when we know we want to return.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/ram-compress.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/migration/ram-compress.c b/migration/ram-compress.c
index 5e1bb82fcd..cf3a6c238d 100644
--- a/migration/ram-compress.c
+++ b/migration/ram-compress.c
@@ -498,14 +498,10 @@ void decompress_data_with_multi_threads(QEMUFile *f, void
*host, int len)
decomp_param[idx].len = len;
qemu_cond_signal(&decomp_param[idx].cond);
qemu_mutex_unlock(&decomp_param[idx].mutex);
- break;
+ return;
}
}
- if (idx < thread_count) {
- break;
- } else {
- qemu_cond_wait(&decomp_done_cond, &decomp_done_lock);
- }
+ qemu_cond_wait(&decomp_done_cond, &decomp_done_lock);
}
}
--
2.40.1
- [PATCH 02/18] migration: Give one error if trying to set COMPRESSION and XBZRLE, (continued)
- [PATCH 02/18] migration: Give one error if trying to set COMPRESSION and XBZRLE, Juan Quintela, 2023/06/13
- [PATCH 08/18] migration: Move update_compress_threads_counts() to ram-compress.c, Juan Quintela, 2023/06/13
- [PATCH 09/18] migration: Make compress_data_with_multithreads return bool, Juan Quintela, 2023/06/13
- [PATCH 06/18] migration: Create populate_compress(), Juan Quintela, 2023/06/13
- [PATCH 10/18] migration: Simplify compress_page_with_multithread(), Juan Quintela, 2023/06/13
- [PATCH 13/18] migration: Simplify decompress_data_with_multi_threads(),
Juan Quintela <=
- [PATCH 15/18] migration: save_compress_page() can take block through pss, Juan Quintela, 2023/06/13
- [PATCH 18/18] migration: Remove not needed file parameter for save_zero_page*, Juan Quintela, 2023/06/13
- [PATCH 05/18] migration: Move compression_counters cleanup ram-compress.c, Juan Quintela, 2023/06/13
- [PATCH 12/18] migration: Create compression_update_rates(), Juan Quintela, 2023/06/13
- [PATCH 11/18] migration: Move busy++ to migrate_with_multithread, Juan Quintela, 2023/06/13