From: Tejun Heo <tj@kernel.org>
To: Zhang Wensheng <zhangwensheng5@huawei.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
yukuai3@huawei.com
Subject: Re: [PATCH -next] block: fix io hung of setting throttle limit frequently
Date: Mon, 16 May 2022 09:29:12 -1000 [thread overview]
Message-ID: <YoKmCOAzwzw3Lz7g@slm.duckdns.org> (raw)
In-Reply-To: <20220516014429.33723-1-zhangwensheng5@huawei.com>
On Mon, May 16, 2022 at 09:44:29AM +0800, Zhang Wensheng wrote:
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 469c483719be..8acb205dfa85 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -1321,12 +1321,14 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
> * that a group's limit are dropped suddenly and we don't want to
> * account recently dispatched IO with new low rate.
> */
> - throtl_start_new_slice(tg, READ);
> - throtl_start_new_slice(tg, WRITE);
> + if (!timer_pending(&sq->parent_sq->pending_timer)) {
> + throtl_start_new_slice(tg, READ);
> + throtl_start_new_slice(tg, WRITE);
>
> - if (tg->flags & THROTL_TG_PENDING) {
> - tg_update_disptime(tg);
> - throtl_schedule_next_dispatch(sq->parent_sq, true);
> + if (tg->flags & THROTL_TG_PENDING) {
> + tg_update_disptime(tg);
> + throtl_schedule_next_dispatch(sq->parent_sq, true);
> + }
Yeah, but this ends up breaking the reason why it's starting the new slices
in the first place explained in the commit above, right? I'm not sure what
the right solution is but this likely isn't it.
Thanks.
--
tejun
next prev parent reply other threads:[~2022-05-16 19:29 UTC|newest]
Thread overview: 6+ 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 19:29 ` Tejun Heo [this message]
2022-05-17 3:12 ` yukuai (C)
2022-05-17 4:18 ` Tejun Heo
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=YoKmCOAzwzw3Lz7g@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox