From: Shaohua Li <shli@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 1/2] blk-throtl: make latency= absolute
Date: Thu, 9 Nov 2017 15:12:12 -0800 [thread overview]
Message-ID: <20171109231212.mbqwyzpmciyshxov@kernel.org> (raw)
In-Reply-To: <20171109221924.GB983427@devbig577.frc2.facebook.com>
On Thu, Nov 09, 2017 at 02:19:24PM -0800, Tejun Heo wrote:
> Currently, the latency= parameter specifies the extra latency on top
> of the estimated baseline latency. This doesn't seem ideal for the
> following two reasons.
>
> 1. Sometimes we want to use absolute target latencies, especially as
> the baseline latency estimation isn't always reliable.
>
> 2. If we want to set a latency target relative to the estimated
> baseline latency, it makes a lot more sense to express the target
> as a percentage of the baseline (say, 120% of the expected latency)
> rather than the baseline latency + an absolute offset.
>
> This patch makes the existing latency= parameter to be interpreted as
> an absolute latency target instead of an offset to the baseline. The
> next patch will add support for relative latency target expressed in
> terms of percentage.
>
> While this is a userland visible change, io.low support is still
> evoling and highly experimental. This isn't expected to break any
> actual usages.
The percentage latency makes sense, but the absolute latency doesn't to me. A
4k IO latency could be much smaller than 1M IO latency. If we don't add
baseline latency, we can't specify a latency target which works for both 4k and
1M IO.
Thanks,
Shaohua
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Shaohua Li <shli@kernel.org>
> ---
> block/blk-throttle.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -2299,8 +2299,7 @@ void blk_throtl_bio_endio(struct bio *bi
>
> bucket = request_bucket_index(
> blk_stat_size(&bio->bi_issue_stat));
> - threshold = tg->td->avg_buckets[bucket].latency +
> - tg->latency_target;
> + threshold = tg->latency_target;
> if (lat > threshold)
> tg->bad_bio_cnt++;
> /*
next prev parent reply other threads:[~2017-11-09 23:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 22:19 Tejun Heo
2017-11-09 22:20 ` [PATCH 2/2] blk-throtl: add relative percentage support to latency= Tejun Heo
2017-11-14 22:06 ` Shaohua Li
2017-11-09 23:12 ` Shaohua Li [this message]
2017-11-09 23:42 ` [PATCH 1/2] blk-throtl: make latency= absolute Tejun Heo
2017-11-10 4:27 ` Shaohua Li
2017-11-10 15:43 ` Tejun Heo
2017-11-13 4:29 ` Shaohua Li
2017-11-13 11:27 ` Tejun Heo
2017-11-13 14:18 ` Tejun Heo
2017-11-13 22:08 ` Shaohua Li
2017-11-14 14:52 ` Tejun Heo
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=20171109231212.mbqwyzpmciyshxov@kernel.org \
--to=shli@kernel.org \
--cc=axboe@kernel.dk \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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
all inboxes | Powered by JetHome®