Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457709

[PATCH V2 16/22] block, bfq: preserve a low latency also with NCQ-capable drives

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Paolo Valente <paolo.valente@linaro.org>
Newsgroups linux.kernel
Subject [PATCH V2 16/22] block, bfq: preserve a low latency also with NCQ-capable drives
Date Mon, 08 Aug 2016 13:20:01 +0200
Message-ID <s3QL7-Ev-9@gated-at.bofh.it> (permalink)
References <s3QL7-Ev-7@gated-at.bofh.it>
X-Original-To Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>
X-Mailer git-send-email 1.9.1
Unimore-X-Sa-Score -2.9
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 48
Organization linux.* mail to news gateway
X-Original-Cc linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, Paolo Valente <paolo.valente@linaro.org>, Arianna Avanzini <avanzini.arianna@gmail.com>
X-Original-Date Mon, 8 Aug 2016 13:15:11 +0200
X-Original-Message-ID <1470654917-4280-17-git-send-email-paolo.valente@linaro.org>
X-Original-References <1470654917-4280-1-git-send-email-paolo.valente@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1457709

Show key headers only | View raw


I/O schedulers typically allow NCQ-capable drives to prefetch I/O
requests, as NCQ boosts the throughput exactly by prefetching and
internally reordering requests.

Unfortunately, as discussed in detail and shown experimentally in [1],
this may cause fairness and latency guarantees to be violated. The
main problem is that the internal scheduler of an NCQ-capable drive
may postpone the service of some unlucky (prefetched) requests as long
as it deems serving other requests more appropriate to boost the
throughput.

This patch addresses this issue by not disabling device idling for
weight-raised queues, even if the device supports NCQ. This allows BFQ
to start serving a new queue, and therefore allows the drive to
prefetch new requests, only after the idling timeout expires. At that
time, all the outstanding requests of the expired queue have been most
certainly served.

[1] P. Valente and M. Andreolini, "Improving Application
    Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of
    the 5th Annual International Systems and Storage Conference
    (SYSTOR '12), June 2012.
    Slightly extended version:
    http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite-
							results.pdf

Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
---
 block/cfq-iosched.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 932adfd..d3cda1a 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -5524,7 +5524,8 @@ static void bfq_update_idle_window(struct bfq_data *bfqd,
 
 	if (atomic_read(&bic->icq.ioc->active_ref) == 0 ||
 	    bfqd->bfq_slice_idle == 0 ||
-		(bfqd->hw_tag && BFQQ_SEEKY(bfqq)))
+		(bfqd->hw_tag && BFQQ_SEEKY(bfqq) &&
+			bfqq->wr_coeff == 1))
 		enable_idle = 0;
 	else if (bfq_sample_valid(bic->ttime.ttime_samples)) {
 		if (bic->ttime.ttime_mean > bfqd->bfq_slice_idle &&
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH V2 16/22] block, bfq: preserve a low latency also with NCQ-capable drives Paolo Valente <paolo.valente@linaro.org> - 2016-08-08 13:20 +0200

csiph-web