[PATCH 4/9] iowatcher: Use queue events if issue not available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently queue depth and latency graphs are generated from ISSUE and
COMPLETE events. For traces which miss the ISSUE events (e.g. from
device mapper) use QUEUE events instead. The result won't be as great
but it still conveys some useful information.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 iowatcher/blkparse.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/iowatcher/blkparse.c b/iowatcher/blkparse.c
index ef33d5be79a1..78a16e5944c3 100644
--- a/iowatcher/blkparse.c
+++ b/iowatcher/blkparse.c
@@ -1097,8 +1097,17 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
 		return;
 
 	if (action == __BLK_TA_QUEUE) {
-		if (trace->found_issue || trace->found_completion)
-			hash_queued_io(trace->io);
+		if (trace->found_issue || trace->found_completion) {
+			pio = hash_queued_io(trace->io);
+			/*
+			 * When there are no ISSUE events count depth and
+			 * latency at least from queue events
+			 */
+			if (pio && !trace->found_issue) {
+				pio->dispatch_time = io->time;
+				goto account_io;
+			}
+		}
 		return;
 	}
 	if (action == __BLK_TA_REQUEUE) {
@@ -1118,6 +1127,7 @@ void add_pending_io(struct trace *trace, struct graph_line_data *gld)
 		free(pio);
 	}
 
+account_io:
 	ios_in_flight++;
 
 	seconds = SECONDS(io->time);
-- 
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux