aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorCorrado Zoccolo <czoccolo@gmail.com>2009-11-26 03:41:21 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-11-26 03:46:46 -0500
commitc16632bab1a17e357cec66920ceb3f0630009360 (patch)
tree6937755404314252f0bf2c46eec374c32c12f8b1 /block/cfq-iosched.c
parent2d4dc890b5c8fabd818a8586607e6843c4375e62 (diff)
cfq-iosched: cleanup unreachable code
cfq_should_idle returns false for no-idle queues that are not the last, so the control flow will never reach the removed code in a state that satisfies the if condition. The unreachable code was added to emulate previous cfq behaviour for non-NCQ rotational devices. My tests show that even without it, the performances and fairness are comparable with previous cfq, thanks to the fact that all seeky queues are grouped together, and that we idle at the end of the tree. Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 467981e19d7a..c2ef5d17608c 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1269,19 +1269,6 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
1269 cfq_mark_cfqq_wait_request(cfqq); 1269 cfq_mark_cfqq_wait_request(cfqq);
1270 1270
1271 sl = cfqd->cfq_slice_idle; 1271 sl = cfqd->cfq_slice_idle;
1272 /* are we servicing noidle tree, and there are more queues?
1273 * non-rotational or NCQ: no idle
1274 * non-NCQ rotational : very small idle, to allow
1275 * fair distribution of slice time for a process doing back-to-back
1276 * seeks.
1277 */
1278 if (cfqd->serving_type == SYNC_NOIDLE_WORKLOAD &&
1279 service_tree_for(cfqd->serving_prio, SYNC_NOIDLE_WORKLOAD, cfqd)
1280 ->count > 0) {
1281 if (blk_queue_nonrot(cfqd->queue) || cfqd->hw_tag)
1282 return;
1283 sl = min(sl, msecs_to_jiffies(CFQ_MIN_TT));
1284 }
1285 1272
1286 mod_timer(&cfqd->idle_slice_timer, jiffies + sl); 1273 mod_timer(&cfqd->idle_slice_timer, jiffies + sl);
1287 cfq_log_cfqq(cfqd, cfqq, "arm_idle: %lu", sl); 1274 cfq_log_cfqq(cfqd, cfqq, "arm_idle: %lu", sl);