diff mbox series

[4/4] migration/multifd: pages->used would be cleared when attach to multifd_send_state

Message ID 20191011085050.17622-5-richardw.yang@linux.intel.com
State New
Headers show
Series migration/multifd: trivial cleanup for multifd | expand

Commit Message

Wei Yang Oct. 11, 2019, 8:50 a.m. UTC
When we found an available channel in multifd_send_pages(), its
pages->used is cleared and then attached to multifd_send_state.

It is not necessary to do this twice.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 migration/ram.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Juan Quintela Oct. 11, 2019, 10:24 a.m. UTC | #1
Wei Yang <richardw.yang@linux.intel.com> wrote:
> When we found an available channel in multifd_send_pages(), its
> pages->used is cleared and then attached to multifd_send_state.
>
> It is not necessary to do this twice.
>
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>
diff mbox series

Patch

diff --git a/migration/ram.c b/migration/ram.c
index 71d845b851..051de77d5a 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1129,7 +1129,6 @@  static void *multifd_send_thread(void *opaque)
             p->flags = 0;
             p->num_packets++;
             p->num_pages += used;
-            p->pages->used = 0;
             qemu_mutex_unlock(&p->mutex);
 
             trace_multifd_send(p->id, packet_num, used, flags,