All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Juan Quintela <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	qemu list <qemu-devel@nongnu.org>,
	Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] [PULL 1/8] Postcopy: Avoid 0 length discards
Date: Thu, 16 Jun 2016 10:13:07 +0530	[thread overview]
Message-ID: <d688c62d0928c46437b6b95848922398674538c8.1466052091.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1466052091.git.amit.shah@redhat.com>
In-Reply-To: <cover.1466052091.git.amit.shah@redhat.com>

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The discard code in migration/ram.c would send request for
zero length discards in the case where no discards were needed.
It doesn't appear to have had any bad effect.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Message-id: 1465816605-29488-2-git-send-email-dgilbert@redhat.com
Message-Id: <1465816605-29488-2-git-send-email-dgilbert@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 migration/ram.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/migration/ram.c b/migration/ram.c
index 844ea46..5f929d6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -1557,7 +1557,9 @@ static int postcopy_send_discard_bm_ram(MigrationState *ms,
             } else {
                 discard_length = zero - one;
             }
-            postcopy_discard_send_range(ms, pds, one, discard_length);
+            if (discard_length) {
+                postcopy_discard_send_range(ms, pds, one, discard_length);
+            }
             current = one + discard_length;
         } else {
             current = one;
-- 
2.7.4

  reply	other threads:[~2016-06-16  4:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  4:43 [Qemu-devel] [PULL 0/8] migration: fixes Amit Shah
2016-06-16  4:43 ` Amit Shah [this message]
2016-06-16  4:43 ` [Qemu-devel] [PULL 2/8] Migration: Split out ram part of qmp_query_migrate Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 3/8] Postcopy: Add stats on page requests Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 4/8] test: Postcopy Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 5/8] tests: fix libqtest socket timeouts Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 6/8] Postcopy: Check for support when setting the capability Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 7/8] migration: fix typos in qapi-schema from latest migration additions Amit Shah
2016-06-16  4:43 ` [Qemu-devel] [PULL 8/8] migration: rename functions to starting migrations Amit Shah
2016-06-16 11:39 ` [Qemu-devel] [PULL 0/8] migration: fixes Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2016-06-10  7:00 Amit Shah
2016-06-10  7:00 ` [Qemu-devel] [PULL 1/8] Postcopy: Avoid 0 length discards Amit Shah

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=d688c62d0928c46437b6b95848922398674538c8.1466052091.git.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.