aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2009-12-08 17:52:57 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-12-09 09:11:03 -0500
commitc244bb50a9baa2ec47a458bbafb36b5e559ed5fa (patch)
tree946c9c87e21055ff371a05710c7a0bcf71bdcc18 /block
parentb9d8f4c73b1af4cfd53f819bf84c2bce31232275 (diff)
cfq-iosched: Get rid of cfqq wait_busy_done flag
o Get rid of wait_busy_done flag. This flag only tells we were doing wait busy on a queue and that queue got request so expire it. That information can easily be obtained by (cfq_cfqq_wait_busy() && queue_is_not_empty). So remove this flag and keep code simple. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index b19cd684bf12..f41fdb5f3e0c 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -319,7 +319,6 @@ enum cfqq_state_flags {
319 CFQ_CFQQ_FLAG_coop, /* cfqq is shared */ 319 CFQ_CFQQ_FLAG_coop, /* cfqq is shared */
320 CFQ_CFQQ_FLAG_deep, /* sync cfqq experienced large depth */ 320 CFQ_CFQQ_FLAG_deep, /* sync cfqq experienced large depth */
321 CFQ_CFQQ_FLAG_wait_busy, /* Waiting for next request */ 321 CFQ_CFQQ_FLAG_wait_busy, /* Waiting for next request */
322 CFQ_CFQQ_FLAG_wait_busy_done, /* Got new request. Expire the queue */
323}; 322};
324 323
325#define CFQ_CFQQ_FNS(name) \ 324#define CFQ_CFQQ_FNS(name) \
@@ -348,7 +347,6 @@ CFQ_CFQQ_FNS(sync);
348CFQ_CFQQ_FNS(coop); 347CFQ_CFQQ_FNS(coop);
349CFQ_CFQQ_FNS(deep); 348CFQ_CFQQ_FNS(deep);
350CFQ_CFQQ_FNS(wait_busy); 349CFQ_CFQQ_FNS(wait_busy);
351CFQ_CFQQ_FNS(wait_busy_done);
352#undef CFQ_CFQQ_FNS 350#undef CFQ_CFQQ_FNS
353 351
354#ifdef CONFIG_DEBUG_CFQ_IOSCHED 352#ifdef CONFIG_DEBUG_CFQ_IOSCHED
@@ -1574,7 +1572,6 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1574 1572
1575 cfq_clear_cfqq_wait_request(cfqq); 1573 cfq_clear_cfqq_wait_request(cfqq);
1576 cfq_clear_cfqq_wait_busy(cfqq); 1574 cfq_clear_cfqq_wait_busy(cfqq);
1577 cfq_clear_cfqq_wait_busy_done(cfqq);
1578 1575
1579 /* 1576 /*
1580 * store what was left of this slice, if the queue idled/timed out 1577 * store what was left of this slice, if the queue idled/timed out
@@ -2134,11 +2131,17 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
2134 2131
2135 if (!cfqd->rq_queued) 2132 if (!cfqd->rq_queued)
2136 return NULL; 2133 return NULL;
2134
2135 /*
2136 * We were waiting for group to get backlogged. Expire the queue
2137 */
2138 if (cfq_cfqq_wait_busy(cfqq) && !RB_EMPTY_ROOT(&cfqq->sort_list))
2139 goto expire;
2140
2137 /* 2141 /*
2138 * The active queue has run out of time, expire it and select new. 2142 * The active queue has run out of time, expire it and select new.
2139 */ 2143 */
2140 if ((cfq_slice_used(cfqq) || cfq_cfqq_wait_busy_done(cfqq)) 2144 if (cfq_slice_used(cfqq) && !cfq_cfqq_must_dispatch(cfqq))
2141 && !cfq_cfqq_must_dispatch(cfqq))
2142 goto expire; 2145 goto expire;
2143 2146
2144 /* 2147 /*
@@ -3171,10 +3174,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
3171 cfqq->last_request_pos = blk_rq_pos(rq) + blk_rq_sectors(rq); 3174 cfqq->last_request_pos = blk_rq_pos(rq) + blk_rq_sectors(rq);
3172 3175
3173 if (cfqq == cfqd->active_queue) { 3176 if (cfqq == cfqd->active_queue) {
3174 if (cfq_cfqq_wait_busy(cfqq)) {
3175 cfq_clear_cfqq_wait_busy(cfqq);
3176 cfq_mark_cfqq_wait_busy_done(cfqq);
3177 }
3178 /* 3177 /*
3179 * Remember that we saw a request from this process, but 3178 * Remember that we saw a request from this process, but
3180 * don't start queuing just yet. Otherwise we risk seeing lots 3179 * don't start queuing just yet. Otherwise we risk seeing lots