From: Jens Axboe <jens.axboe@oracle.com>
Date: Fri, 20 Apr 2007 18:45:39 +0000 (+0200)
Subject: cfq-iosched: tighten queue request overlap condition
X-Git-Tag: firefly_0821_release~30258^2^2~3
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cc19747977824ece6aa1c56a29e974fef5ec2b32;p=firefly-linux-kernel-4.4.55.git

cfq-iosched: tighten queue request overlap condition

For tagged devices, allow overlap of requests if the idle window
isn't enabled on the current active queue.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index a8237be97a28..e859b4966e4c 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -989,7 +989,8 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd)
 	 * flight or is idling for a new request, allow either of these
 	 * conditions to happen (or time out) before selecting a new queue.
 	 */
-	if (cfqq->dispatched || timer_pending(&cfqd->idle_slice_timer)) {
+	if (timer_pending(&cfqd->idle_slice_timer) ||
+	    (cfqq->dispatched && cfq_cfqq_idle_window(cfqq))) {
 		cfqq = NULL;
 		goto keep_queue;
 	}