Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 08:53:12PM -0600, Eric Blake wrote: > On 06/16/2016 04:10 AM, Stefan Hajnoczi wrote: > > > > > io_sectors currently only accounts for bytes written, not bytes read. > > > > Therefore, I think we need: > > > > /* Don't charge for efficient zero writes */ > > if (drv->bdrv

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-16 Thread Eric Blake
On 06/16/2016 04:10 AM, Stefan Hajnoczi wrote: > > io_sectors currently only accounts for bytes written, not bytes read. > > Therefore, I think we need: > > /* Don't charge for efficient zero writes */ > if (drv->bdrv_co_pwrite_zeroes) { > io_sectors = 0; > } That's not sufficient. NBD wi

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-16 Thread Stefan Hajnoczi
On Wed, Jun 15, 2016 at 01:37:18PM +0300, Denis V. Lunev wrote: > On 06/15/2016 12:19 PM, Stefan Hajnoczi wrote: > > On Tue, Jun 14, 2016 at 09:20:47PM -0600, Eric Blake wrote: > > > On 06/14/2016 09:25 AM, Denis V. Lunev wrote: > > > > We should not take into account zero blocks for delay calculat

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 12:19 PM, Stefan Hajnoczi wrote: On Tue, Jun 14, 2016 at 09:20:47PM -0600, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: We should not take into account zero blocks for delay calculations. They are not read and thus IO throttling is not required. In the other cas

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-15 Thread Stefan Hajnoczi
On Tue, Jun 14, 2016 at 09:20:47PM -0600, Eric Blake wrote: > On 06/14/2016 09:25 AM, Denis V. Lunev wrote: > > We should not take into account zero blocks for delay calculations. > > They are not read and thus IO throttling is not required. In the > > other case VM migration with 16 Tb QCOW2 disk

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-14 Thread Eric Blake
On 06/14/2016 09:25 AM, Denis V. Lunev wrote: > We should not take into account zero blocks for delay calculations. > They are not read and thus IO throttling is not required. In the > other case VM migration with 16 Tb QCOW2 disk with 4 Gb of data takes > days. > > Signed-off-by: Denis V. Lunev

[Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-14 Thread Denis V. Lunev
We should not take into account zero blocks for delay calculations. They are not read and thus IO throttling is not required. In the other case VM migration with 16 Tb QCOW2 disk with 4 Gb of data takes days. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Stefan Hajn