Skip to content

Commit

Permalink
cfq-iosched: use assigned slice sync value, not default
Browse files Browse the repository at this point in the history
We should use the sysfs modified slice sync value, in case it differs
from the default.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Oct 3, 2009
1 parent 963b72f commit 61f0c1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,12 +1348,13 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
/*
* must wait a bit longer
*/
if (last_sync < cfq_slice_sync) {
cfq_schedule_dispatch(cfqd, cfq_slice_sync - last_sync);
if (last_sync < cfqd->cfq_slice[1]) {
cfq_schedule_dispatch(cfqd,
cfqd->cfq_slice[1] - last_sync);
return 0;
}

depth = last_sync / cfq_slice_sync;
depth = last_sync / cfqd->cfq_slice[1];
if (depth < max_dispatch)
max_dispatch = depth;
}
Expand Down

0 comments on commit 61f0c1d

Please sign in to comment.