Commit aaf1228d authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

cfq-iosched: remove cfq_io_context last_queue

It hasn't been used for a while, kill it off and remove the old
if 0 code chunk.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 783660b2
...@@ -1471,22 +1471,8 @@ cfq_get_io_context(struct cfq_data *cfqd, gfp_t gfp_mask) ...@@ -1471,22 +1471,8 @@ cfq_get_io_context(struct cfq_data *cfqd, gfp_t gfp_mask)
static void static void
cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic) cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic)
{ {
unsigned long elapsed, ttime; unsigned long elapsed = jiffies - cic->last_end_request;
unsigned long ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle);
/*
* 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);
cic->ttime_samples = (7*cic->ttime_samples + 256) / 8; cic->ttime_samples = (7*cic->ttime_samples + 256) / 8;
cic->ttime_total = (7*cic->ttime_total + 256*ttime) / 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, ...@@ -1649,7 +1635,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
cfq_update_io_seektime(cic, rq); cfq_update_io_seektime(cic, rq);
cfq_update_idle_window(cfqd, cfqq, cic); cfq_update_idle_window(cfqd, cfqq, cic);
cic->last_queue = jiffies;
cic->last_request_pos = rq->sector + rq->nr_sectors; cic->last_request_pos = rq->sector + rq->nr_sectors;
if (cfqq == cfqd->active_queue) { if (cfqq == cfqd->active_queue) {
......
...@@ -82,7 +82,6 @@ struct cfq_io_context { ...@@ -82,7 +82,6 @@ struct cfq_io_context {
unsigned long last_end_request; unsigned long last_end_request;
sector_t last_request_pos; sector_t last_request_pos;
unsigned long last_queue;
unsigned long ttime_total; unsigned long ttime_total;
unsigned long ttime_samples; unsigned long ttime_samples;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment