All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "yukuai (C)" <yukuai3@huawei.com>
Cc: Zhang Wensheng <zhangwensheng5@huawei.com>,
	"ming.lei@redhat.com >> Ming Lei" <ming.lei@redhat.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, cgroups@vger.kernel.org
Subject: Re: [PATCH -next] block: fix io hung of setting throttle limit frequently
Date: Mon, 16 May 2022 18:18:44 -1000	[thread overview]
Message-ID: <YoMiJIUehq1UyzgQ@slm.duckdns.org> (raw)
In-Reply-To: <ca251645-8d52-7a93-6ac2-579d97922a9e@huawei.com>

On Tue, May 17, 2022 at 11:12:28AM +0800, yukuai (C) wrote:
> Ming added a condition in tg_with_in_bps_limit():
> -       if (bps_limit == U64_MAX) {
> +       /* no need to throttle if this bio's bytes have been accounted */
> +       if (bps_limit == U64_MAX || bio_flagged(bio, BIO_THROTTLED)) {
> 
> Which will let the first throttled bio to be issued immediately once
> the config if updated.
> 
> Do you think this behaviour is OK? If so, we can do the same for
> tg_with_in_iops_limit.

So, the current behavior is that if the user is being silly, it will get
slower and slower. The new behavior would be that if the user is being
silly, it can issue IOs faster and faster, which creates a perverse
incentive to be silly.

Probably the right thing to do is probably something like translating the
existing budget in light of the new configuration so that config change
neither gives or takes away the budget which has already accumulated. That
said, are you guys seeing this becoming an issue in practice?

Thanks.

-- 
tejun

  reply	other threads:[~2022-05-17  4:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  1:44 [PATCH -next] block: fix io hung of setting throttle limit frequently Zhang Wensheng
2022-05-16  1:44 ` Zhang Wensheng
2022-05-16 19:29 ` Tejun Heo
2022-05-16 19:29   ` Tejun Heo
2022-05-17  3:12   ` yukuai (C)
2022-05-17  3:12     ` yukuai (C)
2022-05-17  4:18     ` Tejun Heo [this message]
2022-05-17  6:16       ` yukuai (C)
2022-05-17  6:16         ` yukuai (C)
2022-05-17  7:49     ` Ming Lei

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=YoMiJIUehq1UyzgQ@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yukuai3@huawei.com \
    --cc=zhangwensheng5@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.