aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-11-04 02:54:55 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-11-04 02:54:55 -0500
commite00ef7997195e4f8e10593727a6286e2e2802159 (patch)
tree51f73547c081f9068296c0c166599e5fbe340c9c /block
parent125c4f221a5352ae08aef2898055b879ad963f01 (diff)
cfq-iosched: get rid of the coop_preempt flag
We need to rework this logic post the cooperating cfq_queue merging, for now just get rid of it and Jeff Moyer will fix the fall out. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index b700f41cafb3..4ab240c875df 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -253,7 +253,6 @@ enum cfqq_state_flags {
253 CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */ 253 CFQ_CFQQ_FLAG_slice_new, /* no requests dispatched in slice */
254 CFQ_CFQQ_FLAG_sync, /* synchronous queue */ 254 CFQ_CFQQ_FLAG_sync, /* synchronous queue */
255 CFQ_CFQQ_FLAG_coop, /* cfqq is shared */ 255 CFQ_CFQQ_FLAG_coop, /* cfqq is shared */
256 CFQ_CFQQ_FLAG_coop_preempt, /* coop preempt */
257}; 256};
258 257
259#define CFQ_CFQQ_FNS(name) \ 258#define CFQ_CFQQ_FNS(name) \
@@ -280,7 +279,6 @@ CFQ_CFQQ_FNS(prio_changed);
280CFQ_CFQQ_FNS(slice_new); 279CFQ_CFQQ_FNS(slice_new);
281CFQ_CFQQ_FNS(sync); 280CFQ_CFQQ_FNS(sync);
282CFQ_CFQQ_FNS(coop); 281CFQ_CFQQ_FNS(coop);
283CFQ_CFQQ_FNS(coop_preempt);
284#undef CFQ_CFQQ_FNS 282#undef CFQ_CFQQ_FNS
285 283
286#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \ 284#define cfq_log_cfqq(cfqd, cfqq, fmt, args...) \
@@ -1070,16 +1068,9 @@ static struct cfq_queue *cfq_get_next_queue(struct cfq_data *cfqd)
1070static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd, 1068static struct cfq_queue *cfq_set_active_queue(struct cfq_data *cfqd,
1071 struct cfq_queue *cfqq) 1069 struct cfq_queue *cfqq)
1072{ 1070{
1073 if (!cfqq) { 1071 if (!cfqq)
1074 cfqq = cfq_get_next_queue(cfqd); 1072 cfqq = cfq_get_next_queue(cfqd);
1075 1073
1076 if (cfqq && !cfq_cfqq_coop_preempt(cfqq))
1077 cfq_clear_cfqq_coop(cfqq);
1078 }
1079
1080 if (cfqq)
1081 cfq_clear_cfqq_coop_preempt(cfqq);
1082
1083 __cfq_set_active_queue(cfqd, cfqq); 1074 __cfq_set_active_queue(cfqd, cfqq);
1084 return cfqq; 1075 return cfqq;
1085} 1076}
@@ -2433,16 +2424,8 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
2433 * if this request is as-good as one we would expect from the 2424 * if this request is as-good as one we would expect from the
2434 * current cfqq, let it preempt 2425 * current cfqq, let it preempt
2435 */ 2426 */
2436 if (cfq_rq_close(cfqd, cfqq, rq) && (!cfq_cfqq_coop(new_cfqq) || 2427 if (cfq_rq_close(cfqd, cfqq, rq))
2437 cfqd->busy_queues == 1)) {
2438 /*
2439 * Mark new queue coop_preempt, so its coop flag will not be
2440 * cleared when new queue gets scheduled at the very first time
2441 */
2442 cfq_mark_cfqq_coop_preempt(new_cfqq);
2443 cfq_mark_cfqq_coop(new_cfqq);
2444 return true; 2428 return true;
2445 }
2446 2429
2447 return false; 2430 return false;
2448} 2431}