Commit aaf1228ddfb44f04c87d1e7dfc5ccffdba74363d
Committed by
Jens Axboe
1 parent
783660b2f6
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: Jens Axboe <jens.axboe@oracle.com>
Showing 2 changed files with 2 additions and 18 deletions Side-by-side Diff
block/cfq-iosched.c
... | ... | @@ -1471,23 +1471,9 @@ |
1471 | 1471 | static void |
1472 | 1472 | cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic) |
1473 | 1473 | { |
1474 | - unsigned long elapsed, ttime; | |
1474 | + unsigned long elapsed = jiffies - cic->last_end_request; | |
1475 | + unsigned long ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle); | |
1475 | 1476 | |
1476 | - /* | |
1477 | - * if this context already has stuff queued, thinktime is from | |
1478 | - * last queue not last end | |
1479 | - */ | |
1480 | -#if 0 | |
1481 | - if (time_after(cic->last_end_request, cic->last_queue)) | |
1482 | - elapsed = jiffies - cic->last_end_request; | |
1483 | - else | |
1484 | - elapsed = jiffies - cic->last_queue; | |
1485 | -#else | |
1486 | - elapsed = jiffies - cic->last_end_request; | |
1487 | -#endif | |
1488 | - | |
1489 | - ttime = min(elapsed, 2UL * cfqd->cfq_slice_idle); | |
1490 | - | |
1491 | 1477 | cic->ttime_samples = (7*cic->ttime_samples + 256) / 8; |
1492 | 1478 | cic->ttime_total = (7*cic->ttime_total + 256*ttime) / 8; |
1493 | 1479 | cic->ttime_mean = (cic->ttime_total + 128) / cic->ttime_samples; |
... | ... | @@ -1649,7 +1635,6 @@ |
1649 | 1635 | cfq_update_io_seektime(cic, rq); |
1650 | 1636 | cfq_update_idle_window(cfqd, cfqq, cic); |
1651 | 1637 | |
1652 | - cic->last_queue = jiffies; | |
1653 | 1638 | cic->last_request_pos = rq->sector + rq->nr_sectors; |
1654 | 1639 | |
1655 | 1640 | if (cfqq == cfqd->active_queue) { |