Skip to content

Commit

Permalink
cfq-iosched: cleanup unreachable code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Corrado Zoccolo authored and Jens Axboe committed Nov 26, 2009
1 parent 2d4dc89 commit c16632b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,19 +1269,6 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
cfq_mark_cfqq_wait_request(cfqq);

sl = cfqd->cfq_slice_idle;
/* are we servicing noidle tree, and there are more queues?
* non-rotational or NCQ: no idle
* non-NCQ rotational : very small idle, to allow
* fair distribution of slice time for a process doing back-to-back
* seeks.
*/
if (cfqd->serving_type == SYNC_NOIDLE_WORKLOAD &&
service_tree_for(cfqd->serving_prio, SYNC_NOIDLE_WORKLOAD, cfqd)
->count > 0) {
if (blk_queue_nonrot(cfqd->queue) || cfqd->hw_tag)
return;
sl = min(sl, msecs_to_jiffies(CFQ_MIN_TT));
}

mod_timer(&cfqd->idle_slice_timer, jiffies + sl);
cfq_log_cfqq(cfqd, cfqq, "arm_idle: %lu", sl);
Expand Down

0 comments on commit c16632b

Please sign in to comment.