qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 06/33] migration/postcopy: discard_length must not be


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [PULL 06/33] migration/postcopy: discard_length must not be 0
Date: Thu, 15 Aug 2019 17:34:37 +0100

From: Wei Yang <address@hidden>

Since we break the loop when there is no more page to discard, we are
sure the following process would find some page to discard.

It is not necessary to check it again.

Signed-off-by: Wei Yang <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
 migration/ram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/migration/ram.c b/migration/ram.c
index 8a97dadec4..4bb5e24459 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2877,9 +2877,7 @@ static int postcopy_send_discard_bm_ram(MigrationState 
*ms,
         } else {
             discard_length = zero - one;
         }
-        if (discard_length) {
-            postcopy_discard_send_range(ms, pds, one, discard_length);
-        }
+        postcopy_discard_send_range(ms, pds, one, discard_length);
         current = one + discard_length;
     }
 
-- 
2.21.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]