diff options
author | Christoph Hellwig <hch@lst.de> | 2011-08-25 08:26:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-25 18:18:42 +0200 |
commit | a597e79ce14ea62266924acc7b8a7030a42ed29b (patch) | |
tree | 2dfae8672b7a3b85d3fa5e138c2ffe361e97cf29 /hw/ide/internal.h | |
parent | 2f4b7593674e986e60b0b0f1a46707e0e149eb6d (diff) | |
download | qemu-a597e79ce14ea62266924acc7b8a7030a42ed29b.zip qemu-a597e79ce14ea62266924acc7b8a7030a42ed29b.tar.gz qemu-a597e79ce14ea62266924acc7b8a7030a42ed29b.tar.bz2 |
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>
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r-- | hw/ide/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h index 02e805f..7f5ef8d 100644 --- a/hw/ide/internal.h +++ b/hw/ide/internal.h @@ -440,6 +440,7 @@ struct IDEState { int lba; int cd_sector_size; int atapi_dma; /* true if dma is requested for the packet cmd */ + BlockAcctCookie acct; /* ATA DMA state */ int io_buffer_size; QEMUSGList sg; |