qemu-e2k/block
Denis V. Lunev f3c3b87dae qcow2: avoid extra flushes in qcow2
The problem with excessive flushing was found by a couple of performance
tests:
  - parallel directory tree creation (from 2 processes)
  - 32 cached writes + fsync at the end in a loop

For the first one results improved from 2.6 loops/sec to 3.5 loops/sec.
Each loop creates 10^3 directories with 10 files in each.

For the second one results improved from ~600 fsync/sec to ~1100
fsync/sec. Though, it was run on SSD so it probably won't show such
performance gain on rotational media.

qcow2_cache_flush() calls bdrv_flush() unconditionally after writing
cache entries of a particular cache. This can lead to as many as
2 additional fdatasyncs inside bdrv_flush.

We can simply skip all fdatasync calls inside qcow2_co_flush_to_os
as bdrv_flush for sure will do the job. These flushes are necessary to
keep the right order of writes to the different caches. Though this is
not necessary in the current code base as this ordering is ensured through
the flush in qcow2_cache_flush_dependency().

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Pavel Borzenkov <pborzenkov@virtuozzo.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-06-08 10:21:09 +02:00
..
Makefile.objs replay: introduce block devices record/replay 2016-03-30 12:15:57 +02:00
accounting.c block: Clean up includes 2016-01-20 13:36:23 +01:00
archipelago.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
backup.c backup: Use BlockBackend for I/O 2016-05-25 19:04:21 +02:00
blkdebug.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
blkreplay.c blkreplay: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
blkverify.c block: Propagate AioContext change to all children 2016-05-19 16:45:31 +02:00
block-backend.c block: Make blk_co_preadv/pwritev() public 2016-05-25 19:04:21 +02:00
bochs.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
cloop.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
commit.c commit: Use BlockBackend for I/O 2016-05-25 19:04:21 +02:00
crypto.c Block layer patches 2016-05-12 16:33:40 +01:00
curl.c block: always compile-check debug prints 2016-05-12 15:22:08 +02:00
dirty-bitmap.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
dmg.c all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
gluster.c gluster: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
io.c block: Kill bdrv_co_write_zeroes() 2016-06-08 10:21:08 +02:00
iscsi.c iscsi: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
linux-aio.c linux-aio: make it more type safe 2016-05-12 15:22:07 +02:00
mirror.c mirror: Use BlockBackend for I/O 2016-05-25 19:04:21 +02:00
nbd-client.c nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nbd-client.h nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nbd.c nbd: Simplify client FUA handling 2016-05-12 15:22:09 +02:00
nfs.c block/nfs: add missing #include "qemu/cutils.h" 2016-03-30 16:50:39 -04:00
null.c block/null-{co,aio}: Implement get_block_status() 2016-03-30 12:16:04 +02:00
parallels.c block: Switch bdrv_write_zeroes() to byte interface 2016-06-08 10:21:08 +02:00
qapi.c block: Don't return throttling info in query-named-block-nodes 2016-05-19 16:45:31 +02:00
qcow.c qcow/qcow2: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qcow2-cache.c qcow2: avoid extra flushes in qcow2 2016-06-08 10:21:09 +02:00
qcow2-cluster.c block: Switch bdrv_write_zeroes() to byte interface 2016-06-08 10:21:08 +02:00
qcow2-refcount.c qcow/qcow2: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qcow2-snapshot.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
qcow2.c qcow2: avoid extra flushes in qcow2 2016-06-08 10:21:09 +02:00
qcow2.h qcow2: avoid extra flushes in qcow2 2016-06-08 10:21:09 +02:00
qed-check.c qed: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qed-cluster.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-gencb.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-l2-cache.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-table.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
qed.c qed: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
qed.h util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
quorum.c block: Propagate AioContext change to all children 2016-05-19 16:45:31 +02:00
raw-aio.h linux-aio: make it more type safe 2016-05-12 15:22:07 +02:00
raw-posix.c raw-posix: Fetch max sectors for host block device 2016-06-08 10:21:09 +02:00
raw-win32.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
raw_bsd.c raw_bsd: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
rbd.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
sheepdog.c block: Allow BDRV_REQ_FUA through blk_pwrite() 2016-05-12 15:22:08 +02:00
snapshot.c block: Fix bdrv_next() memory leak 2016-05-25 19:04:10 +02:00
ssh.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
stream.c stream: Use BlockBackend for I/O 2016-05-25 19:04:21 +02:00
throttle-groups.c block: Move I/O throttling configuration functions to BlockBackend 2016-05-19 16:45:30 +02:00
vdi.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx-endian.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx-log.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vhdx.c all: Remove unnecessary glib.h includes 2016-06-07 18:19:24 +03:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c vmdk: Convert to bdrv_co_pwrite_zeroes() 2016-06-08 10:21:08 +02:00
vpc.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
vvfat.c block: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
win32-aio.c block: Clean up includes 2016-01-20 13:36:23 +01:00
write-threshold.c block: Clean up includes 2016-01-20 13:36:23 +01:00