[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] migration/multifd: used must not be 0 for a pending job
From: |
Wei Yang |
Subject: |
[PATCH v2 4/6] migration/multifd: used must not be 0 for a pending job |
Date: |
Sat, 26 Oct 2019 08:45:18 +0800 |
After thread synchronization request is handled in another case, this
means when we only get pending_job when there is used pages.
Signed-off-by: Wei Yang <address@hidden>
---
migration/ram.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 62072b7a35..12c270e86d 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1132,12 +1132,11 @@ static void *multifd_send_thread(void *opaque)
break;
}
- if (used) {
- ret = qio_channel_writev_all(p->c, p->pages->iov,
- used, &local_err);
- if (ret != 0) {
- break;
- }
+ assert(used);
+ ret = qio_channel_writev_all(p->c, p->pages->iov,
+ used, &local_err);
+ if (ret != 0) {
+ break;
}
qemu_mutex_lock(&p->mutex);
--
2.17.1
- [PATCH v2 0/6] migration/multifd: a new mechanism for send thread sync, Wei Yang, 2019/10/25
- [PATCH v2 2/6] migration/multifd: notify channels_ready when send thread starts, Wei Yang, 2019/10/25
- [PATCH v2 1/6] migration/multifd: move Params update and pages cleanup into multifd_send_fill_packet(), Wei Yang, 2019/10/25
- [PATCH v2 3/6] migration/multifd: use sync field to synchronize send threads, Wei Yang, 2019/10/25
- [PATCH v2 4/6] migration/multifd: used must not be 0 for a pending job,
Wei Yang <=
- [PATCH v2 5/6] migration/multifd: use boolean for pending_job is enough, Wei Yang, 2019/10/25
- [PATCH v2 6/6] migration/multifd: there is no spurious wakeup now, Wei Yang, 2019/10/25