summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-10-03 19:46:03 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-10-03 19:46:03 +0200
commit61f0c1dcaaac71faabac6ef7c839b29f20204bea (patch)
tree81b01d1d4515fc28908446665bca17b69d44fffb /block
parent963b72fc6664be12ea52f35a6addea14ec373433 (diff)
downloadlinux-3.10-61f0c1dcaaac71faabac6ef7c839b29f20204bea.tar.gz
linux-3.10-61f0c1dcaaac71faabac6ef7c839b29f20204bea.tar.bz2
linux-3.10-61f0c1dcaaac71faabac6ef7c839b29f20204bea.zip
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')
-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 3010e2ec20c..ebab60c6be9 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)
/*
* 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;
}