Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-10 Thread Paolo Bonzini
On 10/11/2015 07:14, Fam Zheng wrote: > On Mon, 11/09 17:29, Kevin Wolf wrote: >> Am 09.11.2015 um 17:18 hat Paolo Bonzini geschrieben: >>> >>> >>> On 09/11/2015 17:04, Kevin Wolf wrote: Am 06.11.2015 um 11:22 hat Fam Zheng geschrieben: > The "pnum < nb_sectors" condition in deciding

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-10 Thread Paolo Bonzini
On 10/11/2015 11:12, Kevin Wolf wrote: > > For full mirroring, this strategy will probably make the first > > incremental iteration more expensive. > > You mean because we issue smaller, interleaved write and write_zeroes > requests now instead of only large writes? That's probably right, but >

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-10 Thread Kevin Wolf
Am 10.11.2015 um 10:01 hat Paolo Bonzini geschrieben: > > > On 10/11/2015 07:14, Fam Zheng wrote: > > On Mon, 11/09 17:29, Kevin Wolf wrote: > >> Am 09.11.2015 um 17:18 hat Paolo Bonzini geschrieben: > >>> > >>> > >>> On 09/11/2015 17:04, Kevin Wolf wrote: > Am 06.11.2015 um 11:22 hat Fam

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-09 Thread Paolo Bonzini
On 09/11/2015 17:04, Kevin Wolf wrote: > Am 06.11.2015 um 11:22 hat Fam Zheng geschrieben: >> The "pnum < nb_sectors" condition in deciding whether to actually copy >> data is unnecessarily strict, and the qiov initialization is >> unnecessarily too, for both bdrv_aio_write_zeroes and

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-09 Thread Kevin Wolf
Am 09.11.2015 um 17:18 hat Paolo Bonzini geschrieben: > > > On 09/11/2015 17:04, Kevin Wolf wrote: > > Am 06.11.2015 um 11:22 hat Fam Zheng geschrieben: > >> The "pnum < nb_sectors" condition in deciding whether to actually copy > >> data is unnecessarily strict, and the qiov initialization is >

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-09 Thread Fam Zheng
On Mon, 11/09 17:29, Kevin Wolf wrote: > Am 09.11.2015 um 17:18 hat Paolo Bonzini geschrieben: > > > > > > On 09/11/2015 17:04, Kevin Wolf wrote: > > > Am 06.11.2015 um 11:22 hat Fam Zheng geschrieben: > > >> The "pnum < nb_sectors" condition in deciding whether to actually copy > > >> data is

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-08 Thread Fam Zheng
On Fri, 11/06 19:36, Max Reitz wrote: > > +next_sector = sector_num; > > +next_chunk = sector_num / sectors_per_chunk; > > @next_sector and @next_chunk set here... > > > hbitmap_next_sector = s->sector_num; > > -sector_num = s->sector_num; > > -sectors_per_chunk =

[Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard branches. Reorganize mirror_iteration flow so that we: 1) Find the contiguous

Re: [Qemu-block] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Max Reitz
On 06.11.2015 11:22, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard > branches. > > Reorganize mirror_iteration flow