Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4ade94f authored by Li, Shaohua's avatar Li, Shaohua Committed by Jens Axboe
Browse files

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: default avatarShaohua Li <shaohua.li@intel.com>
Acked-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 62a37f6b
Loading
Loading
Loading
Loading
+4 −9
Original line number Original line Diff line number Diff line
@@ -2417,19 +2417,14 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
			return false;
			return false;


		/*
		/*
		 * If there is only one sync queue, and its think time is
		 * If there is only one sync queue
		 * small, we can ignore async queue here and give the sync
		 * we can ignore async queue here and give the sync
		 * queue no dispatch limit. The reason is a sync queue can
		 * queue no dispatch limit. The reason is a sync queue can
		 * preempt async queue, limiting the sync queue doesn't make
		 * preempt async queue, limiting the sync queue doesn't make
		 * sense. This is useful for aiostress test.
		 * sense. This is useful for aiostress test.
		 */
		 */
		if (cfq_cfqq_sync(cfqq) && cfqd->busy_sync_queues == 1) {
		if (cfq_cfqq_sync(cfqq) && cfqd->busy_sync_queues == 1)
			struct cfq_io_context *cic = RQ_CIC(cfqq->next_rq);

			if (sample_valid(cic->ttime_samples) &&
				cic->ttime_mean < cfqd->cfq_slice_idle)
			promote_sync = true;
			promote_sync = true;
		}


		/*
		/*
		 * We have other queues, don't allow more IO from this one
		 * We have other queues, don't allow more IO from this one