From c488c7f649106d09df76f697adccbe6e72520b26 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 25 Aug 2011 08:26:10 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- block_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block_int.h') diff --git a/block_int.h b/block_int.h index 5f8050d..8a72b80 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 */ -- cgit v1.1