[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/34] migration/multifd: Drop pages->num check in sender thread
From: |
peterx |
Subject: |
[PULL 09/34] migration/multifd: Drop pages->num check in sender thread |
Date: |
Thu, 8 Feb 2024 11:05:03 +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.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: 20240202102857.110210-9-peterx@redhat.com">https://lore.kernel.org/r/20240202102857.110210-9-peterx@redhat.com
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 4d5a01ed93..518f9de723 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -710,13 +710,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
- [PULL 00/34] Migration staging patches, peterx, 2024/02/07
- [PULL 01/34] migration: prevent migration when VM has poisoned memory, peterx, 2024/02/07
- [PULL 02/34] migration/multifd: Drop stale comment for multifd zero copy, peterx, 2024/02/07
- [PULL 03/34] migration/multifd: multifd_send_kick_main(), peterx, 2024/02/07
- [PULL 05/34] migration/multifd: Postpone reset of MultiFDPages_t, peterx, 2024/02/07
- [PULL 06/34] migration/multifd: Drop MultiFDSendParams.normal[] array, peterx, 2024/02/07
- [PULL 07/34] migration/multifd: Separate SYNC request with normal jobs, peterx, 2024/02/07
- [PULL 04/34] migration/multifd: Drop MultiFDSendParams.quit, cleanup error paths, peterx, 2024/02/07
- [PULL 08/34] migration/multifd: Simplify locking in sender thread, peterx, 2024/02/07
- [PULL 09/34] migration/multifd: Drop pages->num check in sender thread,
peterx <=
- [PULL 13/34] migration/multifd: multifd_send_prepare_header(), peterx, 2024/02/07
- [PULL 10/34] migration/multifd: Rename p->num_packets and clean it up, peterx, 2024/02/07
- [PULL 20/34] migration/multifd: Cleanup multifd_save_cleanup(), peterx, 2024/02/07
- [PULL 21/34] migration/multifd: Cleanup multifd_load_cleanup(), peterx, 2024/02/07
- [PULL 11/34] migration/multifd: Move total_normal_pages accounting, peterx, 2024/02/07
- [PULL 12/34] migration/multifd: Move trace_multifd_send|recv(), peterx, 2024/02/07
- [PULL 14/34] migration/multifd: Move header prepare/fill into send_prepare(), peterx, 2024/02/07
- [PULL 15/34] migration/multifd: Forbid spurious wakeups, peterx, 2024/02/07
- [PULL 17/34] migration/multifd: Change retval of multifd_queue_page(), peterx, 2024/02/07
- [PULL 19/34] migration/multifd: Rewrite multifd_queue_page(), peterx, 2024/02/07