Skip to content

Commit

Permalink
blk-iolatency: truncate our current time
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josef Bacik authored and Jens Axboe committed Jul 16, 2018
1 parent d607eef commit 71e9690
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions block/blk-iolatency.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,12 @@ static void iolatency_record_time(struct iolatency_grp *iolat,
u64 start = bio_issue_time(issue);
u64 req_time;

/*
* Have to do this so we are truncated to the correct time that our
* issue is truncated to.
*/
now = __bio_issue_time(now);

if (now <= start)
return;

Expand Down

0 comments on commit 71e9690

Please sign in to comment.