Skip to content

Commit 71e9690

Browse files
Josef Bacikaxboe
authored andcommitted
blk-iolatency: truncate our current time
In our longer tests we noticed that some boxes would degrade to the point of uselessness. This is because we truncate the current time when saving it in our bio, but I was using the raw current time to subtract from. So once the box had been up a certain amount of time it would appear as if our IO's were taking several years to complete. Fix this by truncating the current time so it matches the issue time. Verified this worked by running with this patch for a week on our test tier. Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d607eef commit 71e9690

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

block/blk-iolatency.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,12 @@ static void iolatency_record_time(struct iolatency_grp *iolat,
425425
u64 start = bio_issue_time(issue);
426426
u64 req_time;
427427

428+
/*
429+
* Have to do this so we are truncated to the correct time that our
430+
* issue is truncated to.
431+
*/
432+
now = __bio_issue_time(now);
433+
428434
if (now <= start)
429435
return;
430436

0 commit comments

Comments
 (0)