aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-08-11 02:26:11 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-11 08:33:32 -0400
commit1b379d8daf4e981b2220f057683e35af022d45bc (patch)
treecc8e704bc9248c750375b23576d4659bbdc1322d /block/cfq-iosched.c
parenta33dac26d42d6f156b3b05a929961bd8d904f6e2 (diff)
cfq-iosched: get rid of must_alloc flag
It's not currently used, as pointed out by Gui Jianfeng <guijianfeng@cn.fujitsu.com>. We already check the wait_request flag to allow an idling queue priority allocation access, so we don't need this extra flag. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-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 9e6d0af6c990..f75a54bfc547 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -186,7 +186,6 @@ enum cfqq_state_flags {
186 CFQ_CFQQ_FLAG_on_rr = 0, /* on round-robin busy list */ 186 CFQ_CFQQ_FLAG_on_rr = 0, /* on round-robin busy list */
187 CFQ_CFQQ_FLAG_wait_request, /* waiting for a request */ 187 CFQ_CFQQ_FLAG_wait_request, /* waiting for a request */
188 CFQ_CFQQ_FLAG_must_dispatch, /* must be allowed a dispatch */ 188 CFQ_CFQQ_FLAG_must_dispatch, /* must be allowed a dispatch */
189 CFQ_CFQQ_FLAG_must_alloc, /* must be allowed rq alloc */
190 CFQ_CFQQ_FLAG_must_alloc_slice, /* per-slice must_alloc flag */ 189 CFQ_CFQQ_FLAG_must_alloc_slice, /* per-slice must_alloc flag */
191 CFQ_CFQQ_FLAG_fifo_expire, /* FIFO checked in this slice */ 190 CFQ_CFQQ_FLAG_fifo_expire, /* FIFO checked in this slice */
192 CFQ_CFQQ_FLAG_idle_window, /* slice idling enabled */ 191 CFQ_CFQQ_FLAG_idle_window, /* slice idling enabled */
@@ -213,7 +212,6 @@ static inline int cfq_cfqq_##name(const struct cfq_queue *cfqq) \
213CFQ_CFQQ_FNS(on_rr); 212CFQ_CFQQ_FNS(on_rr);
214CFQ_CFQQ_FNS(wait_request); 213CFQ_CFQQ_FNS(wait_request);
215CFQ_CFQQ_FNS(must_dispatch); 214CFQ_CFQQ_FNS(must_dispatch);
216CFQ_CFQQ_FNS(must_alloc);
217CFQ_CFQQ_FNS(must_alloc_slice); 215CFQ_CFQQ_FNS(must_alloc_slice);
218CFQ_CFQQ_FNS(fifo_expire); 216CFQ_CFQQ_FNS(fifo_expire);
219CFQ_CFQQ_FNS(idle_window); 217CFQ_CFQQ_FNS(idle_window);
@@ -2218,8 +2216,7 @@ static void cfq_prio_boost(struct cfq_queue *cfqq)
2218 2216
2219static inline int __cfq_may_queue(struct cfq_queue *cfqq) 2217static inline int __cfq_may_queue(struct cfq_queue *cfqq)
2220{ 2218{
2221 if ((cfq_cfqq_wait_request(cfqq) || cfq_cfqq_must_alloc(cfqq)) && 2219 if (cfq_cfqq_wait_request(cfqq) && !cfq_cfqq_must_alloc_slice(cfqq)) {
2222 !cfq_cfqq_must_alloc_slice(cfqq)) {
2223 cfq_mark_cfqq_must_alloc_slice(cfqq); 2220 cfq_mark_cfqq_must_alloc_slice(cfqq);
2224 return ELV_MQUEUE_MUST; 2221 return ELV_MQUEUE_MUST;
2225 } 2222 }
@@ -2306,7 +2303,6 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
2306 } 2303 }
2307 2304
2308 cfqq->allocated[rw]++; 2305 cfqq->allocated[rw]++;
2309 cfq_clear_cfqq_must_alloc(cfqq);
2310 atomic_inc(&cfqq->ref); 2306 atomic_inc(&cfqq->ref);
2311 2307
2312 spin_unlock_irqrestore(q->queue_lock, flags); 2308 spin_unlock_irqrestore(q->queue_lock, flags);