aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLi, Shaohua <shaohua.li@intel.com>2011-03-23 03:30:34 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-03-23 03:30:34 -0400
commitc4ade94fc00f8b34589719d8a347f658b6d3951e (patch)
tree24868fc90f85ce3cba1b8218e771ce00506c3f51 /block
parent62a37f6badd1ac97ba07d543b5d4be2f9cb17217 (diff)
cfq-iosched: removing unnecessary think time checking
Removing think time checking. A high thinktime queue might means the queue dispatches several requests and then do away. Limitting such queue seems meaningless. And also this can simplify code. This is suggested by Vivek. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block')
-rw-r--r--block/cfq-iosched.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index fea1b5a9b7e9..7785169f3c8f 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2417,19 +2417,14 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
2417 return false; 2417 return false;
2418 2418
2419 /* 2419 /*
2420 * If there is only one sync queue, and its think time is 2420 * If there is only one sync queue
2421 * small, we can ignore async queue here and give the sync 2421 * we can ignore async queue here and give the sync
2422 * queue no dispatch limit. The reason is a sync queue can 2422 * queue no dispatch limit. The reason is a sync queue can
2423 * preempt async queue, limiting the sync queue doesn't make 2423 * preempt async queue, limiting the sync queue doesn't make
2424 * sense. This is useful for aiostress test. 2424 * sense. This is useful for aiostress test.
2425 */ 2425 */
2426 if (cfq_cfqq_sync(cfqq) && cfqd->busy_sync_queues == 1) { 2426 if (cfq_cfqq_sync(cfqq) && cfqd->busy_sync_queues == 1)
2427 struct cfq_io_context *cic = RQ_CIC(cfqq->next_rq); 2427 promote_sync = true;
2428
2429 if (sample_valid(cic->ttime_samples) &&
2430 cic->ttime_mean < cfqd->cfq_slice_idle)
2431 promote_sync = true;
2432 }
2433 2428
2434 /* 2429 /*
2435 * We have other queues, don't allow more IO from this one 2430 * We have other queues, don't allow more IO from this one