iowatcher: Only hash IOs if there are completion or issue events
authorChris Mason <chris.mason@fusionio.com>
Mon, 22 Oct 2012 15:22:55 +0000 (11:22 -0400)
committerChris Mason <clm@fb.com>
Wed, 24 Sep 2014 19:02:07 +0000 (12:02 -0700)
commit854a1f24812ec5fe84f2d2e0f88c46343aff0284
tree081245367a4f985bc56b1437c1a814e7c6dd0e17
parentaff25f0c38224027652f0d2bbcffaea50d4f7116
iowatcher: Only hash IOs if there are completion or issue events

We use an IO hash table to keep track of the IOs in flight, and this is
used to calculate the latencies from when we issue the IO to when
we complete the IO.

But if there are no completion events, io is never removed from the hash
table.  It grows very large and slows down the run.

Since we already scan all the events looking for outliers, this commit
checks for each major type of event during the scan.  If there are
no completion and no issue events, we don't bother inserting things
into the hash table.

If there are no completion events, we clean up during the issue event.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
iowatcher/blkparse.c