qemu/hw/block
Stefan Hajnoczi fc73548e44 virtio-blk: use blk_io_plug/unplug for Linux AIO batching
The raw-posix block driver implements Linux AIO batching so multiple
requests can be submitted with a single io_submit(2) system call.
Batching is currently only used by virtio-scsi and
virtio-blk-data-plane.

Enable batching for regular virtio-blk so the number of io_submit(2)
system calls is reduced for workloads with queue depth > 1.

In 4KB random read performance tests with queue depth 32, the CPU
utilization on the host is reduced by 9.4%.  The fio job is as follows:

  [global]
  bs=4k
  ioengine=libaio
  iodepth=32
  direct=1
  sync=0
  time_based=1
  runtime=30
  clocksource=gettimeofday
  ramp_time=5

  [job1]
  rw=randread
  filename=/dev/vdb
  size=4096M
  write_bw_log=fio
  write_iops_log=fio
  write_lat_log=fio
  log_avg_msec=1000

This benchmark was run on an raw image on LVM.  The disk was an SSD
drive and -drive cache=none,aio=native was used.

Tested-by: Pradeep Surisetty <psuriset@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
2015-10-12 09:21:10 +01:00
..
dataplane virtio-blk-dataplane: delete bottom half before the AioContext is freed 2015-07-29 10:02:06 +01:00
block.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
cdrom.c bswap.h: Remove cpu_to_be32wu() 2013-11-05 19:57:47 -08:00
ecc.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
fdc.c i8257: rewrite DMA_schedule to avoid hooking into the CPU loop 2015-09-09 15:34:53 +02:00
hd-geometry.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
m25p80.c m25p80: fix s->blk usage before assignment 2015-04-28 15:36:09 +02:00
Makefile.objs block: Always compile virtio-blk dataplane 2014-09-22 11:39:51 +01:00
nand.c block: remove superfluous '\n' around error_report/error_setg 2015-03-10 08:15:33 +03:00
nvme.c hw/block/nvme.c: Use pow2ceil() rather than hand-calculation 2015-09-07 14:19:00 +01:00
nvme.h nvme: implement the Flush command 2015-07-14 15:55:19 +02:00
onenand.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
pflash_cfi01.c pflash_cfi01: add secure property 2015-06-05 17:36:39 +02:00
pflash_cfi02.c hw: Propagate errors through qdev_prop_set_drive() 2015-03-10 11:18:23 +01:00
tc58128.c shix: Don't require firmware presence for qtest 2013-11-05 17:47:29 +01:00
virtio-blk.c virtio-blk: use blk_io_plug/unplug for Linux AIO batching 2015-10-12 09:21:10 +01:00
xen_blkif.h xen_disk: add discard support 2014-05-07 16:18:04 +00:00
xen_disk.c maint: remove unused include for signal.h 2015-09-11 10:21:38 +03:00