From: Shaohua Li <shaohua.li@intel.com>
Date: Thu, 3 Dec 2009 11:58:05 +0000 (+0100)
Subject: cfq-iosched: no dispatch limit for single queue
X-Git-Tag: firefly_0821_release~9833^2~3959^2~39
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=474b18ccc264c472abeec50f48469b6477202699;p=firefly-linux-kernel-4.4.55.git

cfq-iosched: no dispatch limit for single queue

Since commit 2f5cb7381b737e24c8046fd4aeab571fb71315f5, each queue can send
up to 4 * 4 requests if only one queue exists. I wonder why we have such limit.
Device supports tag can send more requests. For example, AHCI can send 31
requests. Test (direct aio randread) shows the limits reduce about 4% disk
thoughput.
On the other hand, since we send one request one time, if other queue
pop when current is sending more than cfq_quantum requests, current queue will
stop send requests soon after one request, so sounds there is no big latency.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
---

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 71446497d7b6..f5b59e18ebd3 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1618,9 +1618,9 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
 			return false;
 
 		/*
-		 * Sole queue user, allow bigger slice
+		 * Sole queue user, no limit
 		 */
-		max_dispatch *= 4;
+		max_dispatch = -1;
 	}
 
 	/*