cfq-iosched: remove cfq_io_context last_queue
authorJens Axboe <jens.axboe@oracle.com>
Fri, 19 Jan 2007 00:30:16 +0000 (11:30 +1100)
committerJens Axboe <axboe@carl.home.kernel.dk>
Sun, 11 Feb 2007 22:14:44 +0000 (23:14 +0100)
It hasn't been used for a while, kill it off and remove the old
if 0 code chunk.

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

index 07b706243772e46fe2434248bf0e4fba938fca0a..a31066d6c20c7434b5ad030b6dcae21d2083bdfd 100644 (file)
@@ -1471,22 +1471,8 @@ err:
 static void
 cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic)
 {
-       unsigned long elapsed, ttime;
-
-       /*
-        * if this context already has stuff queued, thinktime is from
-        * last queue not last end
-        */
-#if 0
-       if (time_after(cic->last_end_request, cic->last_queue))
-               elapsed = jiffies - cic->last_end_request;
-       else
-               elapsed = jiffies - cic->last_queue;
-#else
-               elapsed = jiffies - cic->last_end_request;
-#endif
-
-       ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle);
+       unsigned long elapsed = jiffies - cic->last_end_request;
+       unsigned long ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle);
 
        cic->ttime_samples = (7*cic->ttime_samples + 256) / 8;
        cic->ttime_total = (7*cic->ttime_total + 256*ttime) / 8;
@@ -1649,7 +1635,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
        cfq_update_io_seektime(cic, rq);
        cfq_update_idle_window(cfqd, cfqq, cic);
 
-       cic->last_queue = jiffies;
        cic->last_request_pos = rq->sector + rq->nr_sectors;
 
        if (cfqq == cfqd->active_queue) {
index 36a6eacefe20d2c17f60b9b34c569cc8f425a843..83dcd8c0e97493cb5a385dff744f0856fd484625 100644 (file)
@@ -82,7 +82,6 @@ struct cfq_io_context {
 
        unsigned long last_end_request;
        sector_t last_request_pos;
-       unsigned long last_queue;
 
        unsigned long ttime_total;
        unsigned long ttime_samples;