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


Groups > linux.kernel > #1622308

[PATCH V4 13/16] block, bfq: boost the throughput with random I/O on NCQ-capable HDDs

From Paolo Valente <paolo.valente@linaro.org>
Newsgroups linux.kernel
Subject [PATCH V4 13/16] block, bfq: boost the throughput with random I/O on NCQ-capable HDDs
Date 2017-04-12 18:30 +0200
Message-ID <tvtjB-6IX-45@gated-at.bofh.it> (permalink)
References <tvtjz-6IX-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch is basically the counterpart, for NCQ-capable rotational
devices, of the previous patch. Exactly as the previous patch does on
flash-based devices and for any workload, this patch disables device
idling on rotational devices, but only for random I/O. In fact, only
with these queues disabling idling boosts the throughput on
NCQ-capable rotational devices. To not break service guarantees,
idling is disabled for NCQ-enabled rotational devices only when the
same symmetry conditions considered in the previous patches hold.

Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
---
 block/bfq-iosched.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 2081784..549f030 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -6439,20 +6439,15 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)
 	 * The next variable takes into account the cases where idling
 	 * boosts the throughput.
 	 *
-	 * The value of the variable is computed considering that
-	 * idling is usually beneficial for the throughput if:
+	 * The value of the variable is computed considering, first, that
+	 * idling is virtually always beneficial for the throughput if:
 	 * (a) the device is not NCQ-capable, or
 	 * (b) regardless of the presence of NCQ, the device is rotational
-	 *     and the request pattern for bfqq is I/O-bound (possible
-	 *     throughput losses caused by granting idling to seeky queues
-	 *     are mitigated by the fact that, in all scenarios where
-	 *     boosting throughput is the best thing to do, i.e., in all
-	 *     symmetric scenarios, only a minimal idle time is allowed to
-	 *     seeky queues).
+	 *     and the request pattern for bfqq is I/O-bound and sequential.
 	 *
 	 * Secondly, and in contrast to the above item (b), idling an
 	 * NCQ-capable flash-based device would not boost the
-	 * throughput even with intense I/O; rather it would lower
+	 * throughput even with sequential I/O; rather it would lower
 	 * the throughput in proportion to how fast the device
 	 * is. Accordingly, the next variable is true if any of the
 	 * above conditions (a) and (b) is true, and, in particular,
@@ -6460,7 +6455,8 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq)
 	 * device.
 	 */
 	idling_boosts_thr = !bfqd->hw_tag ||
-		(!blk_queue_nonrot(bfqd->queue) && bfq_bfqq_IO_bound(bfqq));
+		(!blk_queue_nonrot(bfqd->queue) && bfq_bfqq_IO_bound(bfqq) &&
+		 bfq_bfqq_idle_window(bfqq));
 
 	/*
 	 * The value of the next variable,
-- 
2.10.0

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


Thread

[PATCH V4 00/16] Introduce the BFQ I/O scheduler Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:30 +0200
  [PATCH V4 03/16] block, bfq: improve throughput boosting Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:30 +0200
  [PATCH V4 15/16] block, bfq: remove all get and put of I/O contexts Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:30 +0200
  [PATCH V4 13/16] block, bfq: boost the throughput with random I/O on NCQ-capable HDDs Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:30 +0200
  [PATCH V4 08/16] block, bfq: preserve a low latency also with NCQ-capable drives Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:30 +0200
  [PATCH V4 14/16] block, bfq: handle bursts of queue activations Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 05/16] block, bfq: add more fairness with writes and slow processes Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 09/16] block, bfq: reduce latency during request-pool saturation Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 07/16] block, bfq: reduce I/O latency for soft real-time applications Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 04/16] block, bfq: modify the peak-rate estimator Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 11/16] block, bfq: reduce idling only in symmetric scenarios Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  [PATCH V4 12/16] block, bfq: boost the throughput on NCQ-capable flash-based devices Paolo Valente <paolo.valente@linaro.org> - 2017-04-12 18:40 +0200
  Re: [PATCH V4 00/16] Introduce the BFQ I/O scheduler Paolo Valente <paolo.valente@linaro.org> - 2017-04-19 11:30 +0200
    Re: [PATCH V4 00/16] Introduce the BFQ I/O scheduler Jens Axboe <axboe@kernel.dk> - 2017-04-19 16:40 +0200
      Re: [PATCH V4 00/16] Introduce the BFQ I/O scheduler Paolo Valente <paolo.valente@linaro.org> - 2017-04-19 21:10 +0200
        Re: [PATCH V4 00/16] Introduce the BFQ I/O scheduler Jens Axboe <axboe@kernel.dk> - 2017-04-19 21:40 +0200

csiph-web