[Qemu-devel] [PATCH v4] migration/block: move bdrv_is_allocated() into bb's AioContext

2017-05-05 Thread jemmy858585
From: Lidong Chen when block migration with high-speed, mig_save_device_bulk hold the BQL and invoke bdrv_is_allocated frequently. This patch moves bdrv_is_allocated() into bb's AioContext. It will execute without blocking other I/O activity. Signed-off-by: Lidong Chen --- v4 changelog:

[Qemu-devel] [PATCH v3] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-26 Thread jemmy858585
From: Lidong Chen When the buffer is zero, blk_co_pwrite_zeroes is more effective than blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. This patch can reduce the time for converting qcow2 images with lots of zero data. Signed-off-by: Lidong Chen --- v3 changelog: fix some spelling error

[Qemu-devel] [PATCH] migration/block: optimize the performance by coalescing the same write type

2017-04-24 Thread jemmy858585
From: Lidong Chen This patch optimizes the performance by coalescing the same write type. When the zero/non-zero state changes, perform the write for the accumulated cluster count. Signed-off-by: Lidong Chen --- Thanks Fam Zheng and Stefan's advice. --- migration/block.c | 66 +

[Qemu-devel] [PATCH 2/2] qemu-img: fix some spelling errors

2017-04-23 Thread jemmy858585
From: Lidong Chen Fix some spelling errors in is_allocated_sectors comment. Signed-off-by: Lidong Chen --- qemu-img.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index df6d165..0b3349c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1033,8 +1033

[Qemu-devel] [PATCH 1/2] qemu-img: make sure contain the consecutive number of zero bytes

2017-04-23 Thread jemmy858585
From: Lidong Chen is_allocated_sectors_min don't guarantee to contain the consecutive number of zero bytes. this patch fixes this bug. Signed-off-by: Lidong Chen --- qemu-img.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index b220cf7

[Qemu-devel] [PATCH v2] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-21 Thread jemmy858585
From: Lidong Chen when the buffer is zero, blk_co_pwrite_zeroes is more effectively than blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. this patch can reduces the time when converts the qcow2 image with lots of zero. Signed-off-by: Lidong Chen --- v2 changelog: unify the compressed and non-

[Qemu-devel] [PATCH v2] qemu-img: check bs_n when use old style option

2017-04-20 Thread jemmy858585
From: Lidong Chen When use old style option like -o backing_file, img_convert continue run when bs_n > 1, this patch fix this bug. Signed-off-by: Lidong Chen --- v2 changelog: avoid duplicating code. --- qemu-img.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH] qemu-img: use blk_co_pwrite_zeroes for zero sectors when compressed

2017-04-20 Thread jemmy858585
From: Lidong Chen when the buffer is zero, blk_co_pwrite_zeroes is more effectively than blk_co_pwritev with BDRV_REQ_WRITE_COMPRESSED. this patch can reduces the time when converts the qcow2 image with lots of zero. Signed-off-by: Lidong Chen --- qemu-img.c | 19 +-- 1 file ch

[Qemu-devel] [PATCH] qemu-img: check bs_n when use old style option

2017-04-19 Thread jemmy858585
From: Lidong Chen When use old style option like -o backing_file, img_convert continue run when bs_n > 1, this patch fix this bug. Signed-off-by: Lidong Chen --- qemu-img.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-img.c b/qemu-img.c index b220cf7..c673aef 100644 --- a/qe

[Qemu-devel] [PATCH v6] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-12 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this may cause the qcow2 file size to be bigger after migration. This patch checks each cluster, using blk_pwrite_zeroes for each zero cluster. Reviewed-by: Stefan Hajnoczi Signed-off-by: Lidong Chen --- v6 chan

[Qemu-devel] [PATCH v5] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-12 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 35 +

[Qemu-devel] [PATCH v4] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-11 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 33 +

[Qemu-devel] [PATCH v3] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-09 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 38 +

[Qemu-devel] [PATCH v2] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-07 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 37 +

[Qemu-devel] [PATCH 2/2] migration/block: use blk_pwrite_zeroes for each zero cluster

2017-04-06 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Signed-off-by: Lidong Chen --- migration/block.c | 34 +

[Qemu-devel] [PATCH 1/2] block: make bdrv_get_cluster_size public

2017-04-06 Thread jemmy858585
From: Lidong Chen The bdrv_get_cluster_size function is need by block migration to optimize zero cluster. Signed-off-by: Lidong Chen --- block/io.c| 2 +- include/block/block.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 2709a7

[Qemu-devel] [PATCH 0/2] use blk_pwrite_zeroes for each zero cluster

2017-04-06 Thread jemmy858585
From: Lidong Chen BLOCK_SIZE is (1 << 20), qcow2 cluster size is 65536 by default, this maybe cause the qcow2 file size is bigger after migration. This patch check each cluster, use blk_pwrite_zeroes for each zero cluster. Lidong Chen (2): block: make bdrv_get_cluster_size public migration/b

[Qemu-devel] [PATCH v3] migration/block:limit the time used for block migration

2017-04-05 Thread jemmy858585
From: Lidong Chen when migration with high speed, mig_save_device_bulk invoke bdrv_is_allocated too frequently, and cause vnc reponse slowly. this patch limit the time used for bdrv_is_allocated. Signed-off-by: Lidong Chen --- migration/block.c | 35 ++- 1 file

[Qemu-devel] [PATCH v2] migration/block:limit the time used for block migration

2017-04-05 Thread jemmy858585
From: Lidong Chen when migration with quick speed, mig_save_device_bulk invoke bdrv_is_allocated too frequently, and cause vnc reponse slowly. this patch limit the time used for bdrv_is_allocated. Signed-off-by: Lidong Chen --- migration/block.c | 38 ++ 1 f

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

2017-03-14 Thread jemmy858585
From: Lidong Chen 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 --- migration/block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/block.c b/mi