[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/14] migration/multifd: Drop pages->num check in sender thread
From: |
peterx |
Subject: |
[PATCH 08/14] migration/multifd: Drop pages->num check in sender thread |
Date: |
Wed, 31 Jan 2024 18:31:05 +0800 |
From: Peter Xu <peterx@redhat.com>
Now with a split SYNC handler, we always have pages->num set for
pending_job==true. Assert it instead.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/multifd.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index 4dc5af0a15..2d12de01a1 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -705,13 +705,14 @@ static void *multifd_send_thread(void *opaque)
p->iovs_num = 1;
}
- if (pages->num) {
- ret = multifd_send_state->ops->send_prepare(p, &local_err);
- if (ret != 0) {
- qemu_mutex_unlock(&p->mutex);
- break;
- }
+ assert(pages->num);
+
+ ret = multifd_send_state->ops->send_prepare(p, &local_err);
+ if (ret != 0) {
+ qemu_mutex_unlock(&p->mutex);
+ break;
}
+
multifd_send_fill_packet(p);
p->num_packets++;
p->total_normal_pages += pages->num;
--
2.43.0
- [PATCH 03/14] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths, (continued)
- [PATCH 03/14] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths, peterx, 2024/01/31
- [PATCH 04/14] migration/multifd: Postpone reset of MultiFDPages_t, peterx, 2024/01/31
- [PATCH 06/14] migration/multifd: Separate SYNC request with normal jobs, peterx, 2024/01/31
- [PATCH 07/14] migration/multifd: Simplify locking in sender thread, peterx, 2024/01/31
- [PATCH 05/14] migration/multifd: Drop MultiFDSendParams.normal[] array, peterx, 2024/01/31
- [PATCH 08/14] migration/multifd: Drop pages->num check in sender thread,
peterx <=
- [PATCH 10/14] migration/multifd: Move total_normal_pages accounting, peterx, 2024/01/31
- [PATCH 11/14] migration/multifd: Move trace_multifd_send|recv(), peterx, 2024/01/31
- [PATCH 09/14] migration/multifd: Rename p->num_packets and clean it up, peterx, 2024/01/31
- [PATCH 12/14] migration/multifd: multifd_send_prepare_header(), peterx, 2024/01/31
- [PATCH 13/14] migration/multifd: Move header prepare/fill into send_prepare(), peterx, 2024/01/31