cfq-iosched: slice offset should take ioprio into account
authorJens Axboe <jens.axboe@oracle.com>
Fri, 20 Apr 2007 12:18:00 +0000 (14:18 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Mon, 30 Apr 2007 07:01:22 +0000 (09:01 +0200)
Use the max_slice-cur_slice as the multipler for the insertion offset.

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

index 29284fa06e6b2adc7097d6f951495be8cdf5dd09..4a0397022f5b6e2ecb318fd5d25329fbffba626d 100644 (file)
@@ -442,7 +442,8 @@ static unsigned long cfq_slice_offset(struct cfq_data *cfqd,
        /*
         * just an approximation, should be ok.
         */
-       return ((cfqd->busy_queues - 1) * cfq_prio_slice(cfqd, 1, 0));
+       return (cfqd->busy_queues - 1) * (cfq_prio_slice(cfqd, 1, 0) -
+                      cfq_prio_slice(cfqd, cfq_cfqq_sync(cfqq), cfqq->ioprio));
 }
 
 /*