aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-04-23 02:26:36 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2007-04-30 03:01:22 -0400
commit20e493a8d03b3b2f51b619a453f7bbbebedd6bda (patch)
tree766d1cccd84acac99a806f181a6f68682f5f0aec /block
parent6084cdda0ea4561feb68e00a8c50068bba98006d (diff)
cfq-iosched: get rid of ->dispatch_slice
We can track it fairly accurately locally, let the slice handling take care of the rest. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index f089eeecdf32..839086dcb0af 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -106,7 +106,6 @@ struct cfq_data {
106 106
107 struct cfq_queue *active_queue; 107 struct cfq_queue *active_queue;
108 struct cfq_io_context *active_cic; 108 struct cfq_io_context *active_cic;
109 unsigned int dispatch_slice;
110 109
111 struct timer_list idle_class_timer; 110 struct timer_list idle_class_timer;
112 111
@@ -775,8 +774,6 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
775 put_io_context(cfqd->active_cic->ioc); 774 put_io_context(cfqd->active_cic->ioc);
776 cfqd->active_cic = NULL; 775 cfqd->active_cic = NULL;
777 } 776 }
778
779 cfqd->dispatch_slice = 0;
780} 777}
781 778
782static inline void cfq_slice_expired(struct cfq_data *cfqd, int timed_out) 779static inline void cfq_slice_expired(struct cfq_data *cfqd, int timed_out)
@@ -1026,7 +1023,6 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1026 */ 1023 */
1027 cfq_dispatch_insert(cfqd->queue, rq); 1024 cfq_dispatch_insert(cfqd->queue, rq);
1028 1025
1029 cfqd->dispatch_slice++;
1030 dispatched++; 1026 dispatched++;
1031 1027
1032 if (!cfqd->active_cic) { 1028 if (!cfqd->active_cic) {
@@ -1044,7 +1040,7 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1044 * queue always expire after 1 dispatch round. 1040 * queue always expire after 1 dispatch round.
1045 */ 1041 */
1046 if (cfqd->busy_queues > 1 && ((!cfq_cfqq_sync(cfqq) && 1042 if (cfqd->busy_queues > 1 && ((!cfq_cfqq_sync(cfqq) &&
1047 cfqd->dispatch_slice >= cfq_prio_to_maxrq(cfqd, cfqq)) || 1043 dispatched >= cfq_prio_to_maxrq(cfqd, cfqq)) ||
1048 cfq_class_idle(cfqq))) { 1044 cfq_class_idle(cfqq))) {
1049 cfqq->slice_end = jiffies + 1; 1045 cfqq->slice_end = jiffies + 1;
1050 cfq_slice_expired(cfqd, 0); 1046 cfq_slice_expired(cfqd, 0);