All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yang <richardw.yang@linux.intel.com>
To: quintela@redhat.com, dgilbert@redhat.com
Cc: qemu-devel@nongnu.org, Wei Yang <richardw.yang@linux.intel.com>
Subject: [PATCH 4/4] migration/multifd: pages->used would be cleared when attach to multifd_send_state
Date: Fri, 11 Oct 2019 16:50:50 +0800	[thread overview]
Message-ID: <20191011085050.17622-5-richardw.yang@linux.intel.com> (raw)
In-Reply-To: <20191011085050.17622-1-richardw.yang@linux.intel.com>

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(-)

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,
-- 
2.17.1



  parent reply	other threads:[~2019-10-11  8:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  8:50 [PATCH 0/4] migration/multifd: trivial cleanup for multifd Wei Yang
2019-10-11  8:50 ` [PATCH 1/4] migration/multifd: fix a typo in comment of multifd_recv_unfill_packet() Wei Yang
2019-10-11  9:44   ` Juan Quintela
2019-10-11  8:50 ` [PATCH 2/4] migration/multifd: use pages->allocated instead of the static max Wei Yang
2019-10-11 10:31   ` Juan Quintela
2019-10-11  8:50 ` [PATCH 3/4] migration/multifd: initialize packet->magic/version once at setup stage Wei Yang
2019-10-11 10:20   ` Juan Quintela
2019-10-11 12:17     ` Wei Yang
2019-10-11  8:50 ` Wei Yang [this message]
2019-10-11 10:24   ` [PATCH 4/4] migration/multifd: pages->used would be cleared when attach to multifd_send_state Juan Quintela
2019-10-11 14:02 ` [PATCH 0/4] migration/multifd: trivial cleanup for multifd Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191011085050.17622-5-richardw.yang@linux.intel.com \
    --to=richardw.yang@linux.intel.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.