[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <43daae87ff5fd6ed66e7859b8bc17818f309b9ff.1616649216.git.brookxu@tencent.com>
Date: Thu, 25 Mar 2021 14:57:49 +0800
From: brookxu <brookxu.cn@...il.com>
To: paolo.valente@...aro.org, axboe@...nel.dk, tj@...nel.org
Cc: linux-block@...r.kernel.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 05/14] bfq: limit the IO depth of CLASS_IDLE to 1
From: Chunguang Xu <brookxu@...cent.com>
The IO depth of queues belong to CLASS_IDLE is limited to 1,
so that it can avoid introducing a larger tail latency under
a device with a larger IO depth. Although limiting the IO
depth may reduce the performance of idle_class, it is
generally not a big problem, because idle_class usually does
not have strict performance requirements.
Signed-off-by: Chunguang Xu <brookxu@...cent.com>
---
block/bfq-iosched.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 5f7a0cc..8eaf0eb 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -4831,6 +4831,17 @@ static struct request *__bfq_dispatch_request(struct blk_mq_hw_ctx *hctx)
if (!bfqq)
goto exit;
+ /*
+ * Here, the IO depth of queues belong to CLASS_IDLE is limited
+ * to 1, so that it can avoid introducing a larger tail latency
+ * under a device with a larger IO depth. Although limiting the
+ * IO depth may reduce the performance of idle_class, it is
+ * generally not a big problem, because idle_class usually
+ * does not have strict performance requirements.
+ */
+ if (bfq_class_idle(bfqq) && bfqq->dispatched)
+ goto exit;
+
rq = bfq_dispatch_rq_from_bfqq(bfqd, bfqq);
if (rq) {
--
1.8.3.1
Powered by blists - more mailing lists