aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-10-03 13:46:03 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-03 13:46:03 -0400
commit61f0c1dcaaac71faabac6ef7c839b29f20204bea (patch)
tree81b01d1d4515fc28908446665bca17b69d44fffb /block/cfq-iosched.c
parent963b72fc6664be12ea52f35a6addea14ec373433 (diff)
cfq-iosched: use assigned slice sync value, not default
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>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 3010e2ec20c2..ebab60c6be9d 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1348,12 +1348,13 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
1348 /* 1348 /*
1349 * must wait a bit longer 1349 * must wait a bit longer
1350 */ 1350 */
1351 if (last_sync < cfq_slice_sync) { 1351 if (last_sync < cfqd->cfq_slice[1]) {
1352 cfq_schedule_dispatch(cfqd, cfq_slice_sync - last_sync); 1352 cfq_schedule_dispatch(cfqd,
1353 cfqd->cfq_slice[1] - last_sync);
1353 return 0; 1354 return 0;
1354 } 1355 }
1355 1356
1356 depth = last_sync / cfq_slice_sync; 1357 depth = last_sync / cfqd->cfq_slice[1];
1357 if (depth < max_dispatch) 1358 if (depth < max_dispatch)
1358 max_dispatch = depth; 1359 max_dispatch = depth;
1359 } 1360 }