Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213065
b: refs/heads/master
c: 5e901a2
h: refs/heads/master
i:
  213063: e66dc18
v: v3
  • Loading branch information
Vivek Goyal authored and Jens Axboe committed Oct 1, 2010
1 parent 1b40c09 commit 2e1f3c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3aad5d3ee4e4fce8f4b5bb6ca73342dcade42b33
refs/heads/master: 5e901a2b95db709c5e40599ff4df6029be1e2a12
7 changes: 3 additions & 4 deletions trunk/block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ static bool tg_with_in_iops_limit(struct throtl_data *td, struct throtl_grp *tg,

jiffy_elapsed_rnd = roundup(jiffy_elapsed_rnd, throtl_slice);

io_allowed = (tg->iops[rw] * jiffies_to_msecs(jiffy_elapsed_rnd))
/ MSEC_PER_SEC;
io_allowed = (tg->iops[rw] * jiffy_elapsed_rnd) / HZ;

if (tg->io_disp[rw] + 1 <= io_allowed) {
if (wait)
Expand Down Expand Up @@ -476,8 +475,8 @@ static bool tg_with_in_bps_limit(struct throtl_data *td, struct throtl_grp *tg,

jiffy_elapsed_rnd = roundup(jiffy_elapsed_rnd, throtl_slice);

tmp = tg->bps[rw] * jiffies_to_msecs(jiffy_elapsed_rnd);
do_div(tmp, MSEC_PER_SEC);
tmp = tg->bps[rw] * jiffy_elapsed_rnd;
do_div(tmp, HZ);
bytes_allowed = tmp;

if (tg->bytes_disp[rw] + bio->bi_size <= bytes_allowed) {
Expand Down

0 comments on commit 2e1f3c8

Please sign in to comment.