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 <firstname.lastname@example.org>
1 file changed