[PATCH] migrate block dirty bitmap: Fix the block dirty bitmap can't to migration_completion when pending size larger than threshold size : 1、dirty bitmap size big enough (such as 8MB) when block size 1T 2、we set the migrate speed or the bandwith is small enough(such as 4MB/s)

liuhaiwei posted 1 patch 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220908123525.197397-1-liuhaiwei9699@126.com
Maintainers: Eric Blake <eblake@redhat.com>, Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>, John Snow <jsnow@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Fam Zheng <fam@euphon.net>, Juan Quintela <quintela@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
migration/block-dirty-bitmap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH] migrate block dirty bitmap: Fix the block dirty bitmap can't to migration_completion when pending size larger than threshold size : 1、dirty bitmap size big enough (such as 8MB) when block size 1T 2、we set the migrate speed or the bandwith is small enough(such as 4MB/s)
Posted by liuhaiwei 1 year, 8 months ago
From: liuhaiwei <liuhaiwei@inpsur.com>

so we set the fake pending size when pending size > threshold size

Signed-off-by: liuhaiwei <liuhaiwei@inpsur.com>
Signed-off-by: liuhaiwei <liuhaiwei9699@126.com>
---
 migration/block-dirty-bitmap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index 9aba7d9c22..6086d8d1c3 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -782,7 +782,10 @@ static void dirty_bitmap_save_pending(QEMUFile *f, void *opaque,
     }
 
     qemu_mutex_unlock_iothread();
-
+    /*we set the fake pending size  when the dirty bitmap size more than max_size(bandwith of speed) */
+    if(pending > max_size && max_size == 0){
+        pending = max_size - 1;
+    }
     trace_dirty_bitmap_save_pending(pending, max_size);
 
     *res_postcopy_only += pending;
-- 
2.27.0
Re: [PATCH] migrate block dirty bitmap: Fix the block dirty bitmap can't to migration_completion when pending size larger than threshold size : 1、dirty bitmap size big enough (such as 8MB) when block size 1T2、we set the migrate speed or the bandwith is small enough(such as 4MB/s)
Posted by Markus Armbruster 1 year, 8 months ago
Your subject line is waaaaay too long.