]> git.proxmox.com Git - qemu.git/commit - hw/ide/core.c
block: explicit I/O accounting
authorChristoph Hellwig <hch@lst.de>
Thu, 25 Aug 2011 06:26:01 +0000 (08:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 25 Aug 2011 16:18:42 +0000 (18:18 +0200)
commita597e79ce14ea62266924acc7b8a7030a42ed29b
tree2dfae8672b7a3b85d3fa5e138c2ffe361e97cf29
parent2f4b7593674e986e60b0b0f1a46707e0e149eb6d
block: explicit I/O accounting

Decouple the I/O accounting from bdrv_aio_readv/writev/flush and
make the hardware models call directly into the accounting helpers.

This means:
 - we do not count internal requests from image formats in addition
   to guest originating I/O
 - we do not double count I/O ops if the device model handles it
   chunk wise
 - we only account I/O once it actuall is done
 - can extent I/O accounting to synchronous or coroutine I/O easily
 - implement I/O latency tracking easily (see the next patch)

I've conveted the existing device model callers to the new model,
device models that are using synchronous I/O and weren't accounted
before haven't been updated yet.  Also scsi hasn't been converted
to the end-to-end accounting as I want to defer that after the pending
scsi layer overhaul.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 files changed:
block.c
block.h
block_int.h
hw/ide/ahci.c
hw/ide/ahci.h
hw/ide/atapi.c
hw/ide/core.c
hw/ide/internal.h
hw/ide/macio.c
hw/scsi-disk.c
hw/virtio-blk.c
hw/xen_disk.c