aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-04-07 02:56:14 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-07 02:56:14 -0400
commit75e50984f062de2abc4bd84c642923e2c48ce2ae (patch)
tree57da8b176f77f0823f4a7b42cbf4e25f76bd98a6 /block
parent2f5cb7381b737e24c8046fd4aeab571fb71315f5 (diff)
cfq-iosched: kill two unused cfqq flags
We only manipulate the must_dispatch and queue_new flags, they are not tested anymore. So get rid of them. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index a0102a507dae..11efcf196e74 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -179,11 +179,9 @@ enum cfqq_state_flags {
179 CFQ_CFQQ_FLAG_wait_request, /* waiting for a request */ 179 CFQ_CFQQ_FLAG_wait_request, /* waiting for a request */
180 CFQ_CFQQ_FLAG_must_alloc, /* must be allowed rq alloc */ 180 CFQ_CFQQ_FLAG_must_alloc, /* must be allowed rq alloc */
181 CFQ_CFQQ_FLAG_must_alloc_slice, /* per-slice must_alloc flag */ 181 CFQ_CFQQ_FLAG_must_alloc_slice, /* per-slice must_alloc flag */
182 CFQ_CFQQ_FLAG_must_dispatch, /* must dispatch, even if expired */
183 CFQ_CFQQ_FLAG_fifo_expire, /* FIFO checked in this slice */ 182 CFQ_CFQQ_FLAG_fifo_expire, /* FIFO checked in this slice */
184 CFQ_CFQQ_FLAG_idle_window, /* slice idling enabled */ 183 CFQ_CFQQ_FLAG_idle_window, /* slice idling enabled */
185 CFQ_CFQQ_FLAG_prio_changed, /* task priority has changed */ 184 CFQ_CFQQ_FLAG_prio_changed, /* task priority has changed */
186 CFQ_CFQQ_FLAG_queue_new, /* queue never been serviced */
187 CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */ 185 CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */
188 CFQ_CFQQ_FLAG_sync, /* synchronous queue */ 186 CFQ_CFQQ_FLAG_sync, /* synchronous queue */
189}; 187};
@@ -206,11 +204,9 @@ CFQ_CFQQ_FNS(on_rr);
206CFQ_CFQQ_FNS(wait_request); 204CFQ_CFQQ_FNS(wait_request);
207CFQ_CFQQ_FNS(must_alloc); 205CFQ_CFQQ_FNS(must_alloc);
208CFQ_CFQQ_FNS(must_alloc_slice); 206CFQ_CFQQ_FNS(must_alloc_slice);
209CFQ_CFQQ_FNS(must_dispatch);
210CFQ_CFQQ_FNS(fifo_expire); 207CFQ_CFQQ_FNS(fifo_expire);
211CFQ_CFQQ_FNS(idle_window); 208CFQ_CFQQ_FNS(idle_window);
212CFQ_CFQQ_FNS(prio_changed); 209CFQ_CFQQ_FNS(prio_changed);
213CFQ_CFQQ_FNS(queue_new);
214CFQ_CFQQ_FNS(slice_new); 210CFQ_CFQQ_FNS(slice_new);
215CFQ_CFQQ_FNS(sync); 211CFQ_CFQQ_FNS(sync);
216#undef CFQ_CFQQ_FNS 212#undef CFQ_CFQQ_FNS
@@ -777,12 +773,10 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd,
777 cfqq->slice_end = 0; 773 cfqq->slice_end = 0;
778 cfqq->slice_dispatch = 0; 774 cfqq->slice_dispatch = 0;
779 775
780 cfq_clear_cfqq_must_dispatch(cfqq);
781 cfq_clear_cfqq_wait_request(cfqq); 776 cfq_clear_cfqq_wait_request(cfqq);
782 cfq_clear_cfqq_must_alloc_slice(cfqq); 777 cfq_clear_cfqq_must_alloc_slice(cfqq);
783 cfq_clear_cfqq_fifo_expire(cfqq); 778 cfq_clear_cfqq_fifo_expire(cfqq);
784 cfq_mark_cfqq_slice_new(cfqq); 779 cfq_mark_cfqq_slice_new(cfqq);
785 cfq_clear_cfqq_queue_new(cfqq);
786 780
787 del_timer(&cfqd->idle_slice_timer); 781 del_timer(&cfqd->idle_slice_timer);
788 } 782 }
@@ -802,7 +796,6 @@ __cfq_slice_expired(struct cfq_data *cfqd, struct cfq_queue *cfqq,
802 if (cfq_cfqq_wait_request(cfqq)) 796 if (cfq_cfqq_wait_request(cfqq))
803 del_timer(&cfqd->idle_slice_timer); 797 del_timer(&cfqd->idle_slice_timer);
804 798
805 cfq_clear_cfqq_must_dispatch(cfqq);
806 cfq_clear_cfqq_wait_request(cfqq); 799 cfq_clear_cfqq_wait_request(cfqq);
807 800
808 /* 801 /*
@@ -931,7 +924,6 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
931 (sample_valid(cic->ttime_samples) && cic->ttime_mean > 2)) 924 (sample_valid(cic->ttime_samples) && cic->ttime_mean > 2))
932 return; 925 return;
933 926
934 cfq_mark_cfqq_must_dispatch(cfqq);
935 cfq_mark_cfqq_wait_request(cfqq); 927 cfq_mark_cfqq_wait_request(cfqq);
936 928
937 /* 929 /*
@@ -1520,7 +1512,6 @@ retry:
1520 cfqq->cfqd = cfqd; 1512 cfqq->cfqd = cfqd;
1521 1513
1522 cfq_mark_cfqq_prio_changed(cfqq); 1514 cfq_mark_cfqq_prio_changed(cfqq);
1523 cfq_mark_cfqq_queue_new(cfqq);
1524 1515
1525 cfq_init_prio_data(cfqq, ioc); 1516 cfq_init_prio_data(cfqq, ioc);
1526 1517
@@ -1912,7 +1903,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1912 * just now 1903 * just now
1913 */ 1904 */
1914 if (cfq_cfqq_wait_request(cfqq)) { 1905 if (cfq_cfqq_wait_request(cfqq)) {
1915 cfq_mark_cfqq_must_dispatch(cfqq);
1916 del_timer(&cfqd->idle_slice_timer); 1906 del_timer(&cfqd->idle_slice_timer);
1917 blk_start_queueing(cfqd->queue); 1907 blk_start_queueing(cfqd->queue);
1918 } 1908 }
@@ -1924,7 +1914,6 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
1924 * this new queue is RT and the current one is BE 1914 * this new queue is RT and the current one is BE
1925 */ 1915 */
1926 cfq_preempt_queue(cfqd, cfqq); 1916 cfq_preempt_queue(cfqd, cfqq);
1927 cfq_mark_cfqq_must_dispatch(cfqq);
1928 blk_start_queueing(cfqd->queue); 1917 blk_start_queueing(cfqd->queue);
1929 } 1918 }
1930} 1919}
@@ -2201,10 +2190,8 @@ static void cfq_idle_slice_timer(unsigned long data)
2201 /* 2190 /*
2202 * not expired and it has a request pending, let it dispatch 2191 * not expired and it has a request pending, let it dispatch
2203 */ 2192 */
2204 if (!RB_EMPTY_ROOT(&cfqq->sort_list)) { 2193 if (!RB_EMPTY_ROOT(&cfqq->sort_list))
2205 cfq_mark_cfqq_must_dispatch(cfqq);
2206 goto out_kick; 2194 goto out_kick;
2207 }
2208 } 2195 }
2209expire: 2196expire:
2210 cfq_slice_expired(cfqd, timed_out); 2197 cfq_slice_expired(cfqd, timed_out);