diff options
author | Christoph Hellwig <hch@lst.de> | 2011-08-25 08:26:10 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-26 18:18:38 +0200 |
commit | c488c7f649106d09df76f697adccbe6e72520b26 (patch) | |
tree | 7933f6f000b5ea1e5cc4bf528106f85575885723 /block_int.h | |
parent | a597e79ce14ea62266924acc7b8a7030a42ed29b (diff) |
block: latency accounting
Account the total latency for read/write/flush requests. This allows
management tools to average it based on a snapshot of the nr ops
counters and allow checking for SLAs or provide statistics.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h index 5f8050db34..8a72b804b2 100644 --- a/block_int.h +++ b/block_int.h @@ -28,6 +28,7 @@ #include "qemu-option.h" #include "qemu-queue.h" #include "qemu-coroutine.h" +#include "qemu-timer.h" #define BLOCK_FLAG_ENCRYPT 1 #define BLOCK_FLAG_COMPAT6 4 @@ -186,6 +187,7 @@ struct BlockDriverState { /* I/O stats (display with "info blockstats"). */ uint64_t nr_bytes[BDRV_MAX_IOTYPE]; uint64_t nr_ops[BDRV_MAX_IOTYPE]; + uint64_t total_time_ns[BDRV_MAX_IOTYPE]; uint64_t wr_highest_sector; /* Whether the disk can expand beyond total_sectors */ |