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>
Showing
- block.c 26 additions, 22 deletionsblock.c
- block.h 17 additions, 0 deletionsblock.h
- block_int.h 2 additions, 5 deletionsblock_int.h
- hw/ide/ahci.c 9 additions, 0 deletionshw/ide/ahci.c
- hw/ide/ahci.h 1 addition, 0 deletionshw/ide/ahci.h
- hw/ide/atapi.c 20 additions, 9 deletionshw/ide/atapi.c
- hw/ide/core.c 26 additions, 1 deletionhw/ide/core.c
- hw/ide/internal.h 1 addition, 0 deletionshw/ide/internal.h
- hw/ide/macio.c 29 additions, 11 deletionshw/ide/macio.c
- hw/scsi-disk.c 17 additions, 0 deletionshw/scsi-disk.c
- hw/virtio-blk.c 18 additions, 2 deletionshw/virtio-blk.c
- hw/xen_disk.c 5 additions, 0 deletionshw/xen_disk.c
Loading
Please register or sign in to comment