Skip to contentSkip to conversation

cfq-iosched: make nonrot check logic consistent

PATCH New Shaohua Li 1 participant 1 message Nov 11, 2009 Block layer

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 cfq-iosched: make nonrot check logic consistent

cfq_arm_slice_timer() has logic to disable idle window for SSD device. The same thing should be done at cfq_select_queue() too, otherwise we will still see idle window. This makes the nonrot check logic consistent in cfq.

---
 block/cfq-iosched.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
block/cfq-iosched.c +2 -1
Index: linux/block/cfq-iosched.c
===================================================================
@@ -1215,7 +1215,8 @@ static struct cfq_queue *cfq_select_queu
 	 * conditions to happen (or time out) before selecting a new queue.
 	 */
 	if (timer_pending(&cfqd->idle_slice_timer) ||
-	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
+	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq)
+	    && !(blk_queue_nonrot(cfqd->queue) && cfqd->hw_tag))) {
 		cfqq = NULL;
 		goto keep_queue;
 	}