[Top][All Lists]

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

[Qemu-block] [PATCH] migration/block: Avoid involve into blk_drain too f

From: jemmy858585
Subject: [Qemu-block] [PATCH] migration/block: Avoid involve into blk_drain too frequently
Date: Tue, 14 Mar 2017 15:57:23 +0800

From: Lidong Chen <address@hidden>

Increase bmds->cur_dirty after submit io, so reduce the frequency involve into 
blk_drain, and improve the performance obviously when block migration.

Signed-off-by: Lidong Chen <address@hidden>
 migration/block.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/migration/block.c b/migration/block.c
index 6741228..f059cca 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -576,6 +576,8 @@ static int mig_save_device_dirty(QEMUFile *f, 
BlkMigDevState *bmds,
             bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, sector, nr_sectors);
+            sector += nr_sectors;
+            bmds->cur_dirty = sector;
         sector += BDRV_SECTORS_PER_DIRTY_CHUNK;

reply via email to

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