cfq-iosched: fix think time allowed for seekers
authorCorrado Zoccolo <czoccolo@gmail.com>
Wed, 7 Oct 2009 17:51:54 +0000 (19:51 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 7 Oct 2009 17:51:54 +0000 (19:51 +0200)
CFQ enables idle only for processes that think less than the allowed
idle time. Since idle time is lower for seeky queues, we should use the
correct value in the comparison.

Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/cfq-iosched.c

index 4ab33d8a20b220d528700a705f89ada868e44729..b35cc56dfd94fce1d4f1d02e054651a86f4893e1 100644 (file)
@@ -1995,7 +1995,10 @@ cfq_update_idle_window(struct cfq_data *cfqd, struct cfq_queue *cfqq,
            (!cfqd->cfq_latency && cfqd->hw_tag && CIC_SEEKY(cic)))
                enable_idle = 0;
        else if (sample_valid(cic->ttime_samples)) {
-               if (cic->ttime_mean > cfqd->cfq_slice_idle)
+               unsigned int slice_idle = cfqd->cfq_slice_idle;
+               if (sample_valid(cic->seek_samples) && CIC_SEEKY(cic))
+                       slice_idle = msecs_to_jiffies(CFQ_MIN_TT);
+               if (cic->ttime_mean > slice_idle)
                        enable_idle = 0;
                else
                        enable_idle = 1;
This page took 0.029932 seconds and 5 git commands to generate.