[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage i
Re: [Qemu-devel] [PATCH 1/1] block: ignore flush requests when storage is clean
Mon, 20 Jun 2016 16:33:49 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
On 06/20/2016 09:19 AM, Denis V. Lunev wrote:
> From: Evgeny Yakovlev <address@hidden>
> Some guests (win2008 server for example) do a lot of unnecessary
> flushing when underlying media has not changed. This adds additional
> overhead on host when calling fsync/fdatasync.
> This change introduces a dirty flag in BlockDriverState which is set
> in bdrv_set_dirty and is checked in bdrv_co_flush. This allows us to
> avoid unnessesary flushing when storage is clean.
> The problem with excessive flushing was found by a performance test
> which does parallel directory tree creation (from 2 processes).
> Results improved from 0.424 loops/sec to 0.432 loops/sec.
> Each loop creates 10^3 directories with 10 files in each.
> Signed-off-by: Evgeny Yakovlev <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Kevin Wolf <address@hidden>
> CC: Max Reitz <address@hidden>
> CC: Stefan Hajnoczi <address@hidden>
> CC: Fam Zheng <address@hidden>
> block.c | 1 +
> block/dirty-bitmap.c | 3 +++
> block/io.c | 6 ++++++
> include/block/block_int.h | 1 +
> 4 files changed, 11 insertions(+)
Otherwise seems reasonable, but I'll let others with more experience on
flush semantics chime in.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature