[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V6] qemu-img: align result of is_allocated_secto
Re: [Qemu-devel] [PATCH V6] qemu-img: align result of is_allocated_sectors
Thu, 12 Jul 2018 18:23:51 +0200
Am 12.07.2018 um 15:00 hat Peter Lieven geschrieben:
> We currently don't enforce that the sparse segments we detect during convert
> aligned. This leads to unnecessary and costly read-modify-write cycles either
> internally in Qemu or in the background on the storage device as nearly all
> modern filesystems or hardware have a 4k alignment internally.
> This patch modifies is_allocated_sectors so that its *pnum result will always
> end at an alignment boundary. This way all requests will end at an alignment
> boundary. The start of all requests will also be aligned as long as the
> of get_block_status do not lead to an unaligned offset.
> The number of RMW cycles when converting an example image  to a raw device
> has 4k sector size is about 4600 4k read requests to perform a total of about
> write requests. With this path the additional 4600 read requests are
> eliminated while
> the number of total write requests stays constant.
> Signed-off-by: Peter Lieven <address@hidden>
Thanks, applied to the block branch.