linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	ulf.hansson@linaro.org, linus.walleij@linaro.org,
	bfq-iosched@googlegroups.com, oleksandr@natalenko.name,
	bottura.nicola95@gmail.com, srivatsa@csail.mit.edu
Subject: Re: [PATCH BUGFIX IMPROVEMENT V3 1/1] block, bfq: check also in-flight I/O in dispatch plugging
Date: Thu, 18 Jul 2019 07:22:07 -0600	[thread overview]
Message-ID: <8ee30620-44e4-c1a8-5cfe-6f658aa58a85@kernel.dk> (raw)
In-Reply-To: <20190718070852.34568-2-paolo.valente@linaro.org>

On 7/18/19 1:08 AM, Paolo Valente wrote:
> Consider a sync bfq_queue Q that remains empty while in service, and
> suppose that, when this happens, there is a fair amount of already
> in-flight I/O not belonging to Q. In such a situation, I/O dispatching
> may need to be plugged (until new I/O arrives for Q), for the
> following reason.
> 
> The drive may decide to serve in-flight non-Q's I/O requests before
> Q's ones, thereby delaying the arrival of new I/O requests for Q
> (recall that Q is sync). If I/O-dispatching is not plugged, then,
> while Q remains empty, a basically uncontrolled amount of I/O from
> other queues may be dispatched too, possibly causing the service of
> Q's I/O to be delayed even longer in the drive. This problem gets more
> and more serious as the speed and the queue depth of the drive grow,
> because, as these two quantities grow, the probability to find no
> queue busy but many requests in flight grows too.
> 
> If Q has the same weight and priority as the other queues, then the
> above delay is unlikely to cause any issue, because all queues tend to
> undergo the same treatment. So, since not plugging I/O dispatching is
> convenient for throughput, it is better not to plug. Things change in
> case Q has a higher weight or priority than some other queue, because
> Q's service guarantees may simply be violated. For this reason,
> commit 1de0c4cd9ea6 ("block, bfq: reduce idling only in symmetric
> scenarios") does plug I/O in such an asymmetric scenario. Plugging
> minimizes the delay induced by already in-flight I/O, and enables Q to
> recover the bandwidth it may lose because of this delay.
> 
> Yet the above commit does not cover the case of weight-raised queues,
> for efficiency concerns. For weight-raised queues, I/O-dispatch
> plugging is activated simply if not all bfq_queues are
> weight-raised. But this check does not handle the case of in-flight
> requests, because a bfq_queue may become non busy *before* all its
> in-flight requests are completed.
> 
> This commit performs I/O-dispatch plugging for weight-raised queues if
> there are some in-flight requests.
> 
> As a practical example of the resulting recover of control, under
> write load on a Samsung SSD 970 PRO, gnome-terminal starts in 1.5
> seconds after this fix, against 15 seconds before the fix (as a
> reference, gnome-terminal takes about 35 seconds to start with any of
> the other I/O schedulers).
> 
> Fixes: commit 1de0c4cd9ea6 ("block, bfq: reduce idling only in symmetric scenarios")

Applied, but fixed up this line. The format is:

Fixes: 1de0c4cd9ea6 ("block, bfq: reduce idling only in symmetric scenarios")   

-- 
Jens Axboe


      reply	other threads:[~2019-07-18 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18  7:08 [PATCH BUGFIX IMPROVEMENT V3 0/1] block, bfq: eliminate latency regression with fast drives Paolo Valente
2019-07-18  7:08 ` [PATCH BUGFIX IMPROVEMENT V3 1/1] block, bfq: check also in-flight I/O in dispatch plugging Paolo Valente
2019-07-18 13:22   ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ee30620-44e4-c1a8-5cfe-6f658aa58a85@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bfq-iosched@googlegroups.com \
    --cc=bottura.nicola95@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr@natalenko.name \
    --cc=paolo.valente@linaro.org \
    --cc=srivatsa@csail.mit.edu \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).