Skip to content

Commit c7df0bf

Browse files
committed
Merge branch 'for-6.11/block' into for-next
* for-6.11/block: blk-throttle: fix lower control under super low iops limit
2 parents 7cce7fc + 1beabab commit c7df0bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

block/blk-throttle.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,9 @@ static unsigned long tg_within_iops_limit(struct throtl_grp *tg, struct bio *bio
704704

705705
/* Calc approx time to dispatch */
706706
jiffy_wait = jiffy_elapsed_rnd - jiffy_elapsed;
707+
708+
/* make sure at least one io can be dispatched after waiting */
709+
jiffy_wait = max(jiffy_wait, HZ / iops_limit + 1);
707710
return jiffy_wait;
708711
}
709712

0 commit comments

Comments
 (0)