mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Ming Lei <ming.lei@redhat.com>, <tj@kernel.org>
Cc: <mkoutny@suse.com>, <paulmck@kernel.org>, <axboe@kernel.dk>,
	<cgroups@vger.kernel.org>, <linux-block@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH v6 2/2] block: cancel all throttled bios in del_gendisk()
Date: Mon, 24 Jan 2022 11:48:19 +0800	[thread overview]
Message-ID: <96bee53a-7d3b-5066-409c-6b2f203d2137@huawei.com> (raw)
In-Reply-To: <Yd5FkuhYX9YcgQkZ@T590>

在 2022/01/12 11:05, Ming Lei 写道:
> Hello Yu Kuai,
> 
> On Mon, Jan 10, 2022 at 09:47:58PM +0800, Yu Kuai wrote:
>> Throttled bios can't be issued after del_gendisk() is done, thus
>> it's better to cancel them immediately rather than waiting for
>> throttle is done.
>>
>> For example, if user thread is throttled with low bps while it's
>> issuing large io, and the device is deleted. The user thread will
>> wait for a long time for io to return.
>>
>> Noted this patch is mainly from revertion of commit 32e3374304c7
>> ("blk-throttle: remove tg_drain_bios") and commit b77412372b68
>> ("blk-throttle: remove blk_throtl_drain").
>>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>>   block/blk-throttle.c | 77 ++++++++++++++++++++++++++++++++++++++++++++
>>   block/blk-throttle.h |  2 ++
>>   block/genhd.c        |  2 ++
>>   3 files changed, 81 insertions(+)
> 
> Just wondering why not take the built-in way in throtl_upgrade_state() for
> canceling throttled bios? Something like the following, then we can avoid
> to re-invent the wheel.

Hi, Tejun



  parent reply	other threads:[~2022-01-24  3:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 13:47 [PATCH v6 0/2] " Yu Kuai
2022-01-10 13:47 ` [PATCH v6 1/2] blk-throtl: move WARN_ON_ONCE() from throtl_rb_first() to it's caller Yu Kuai
2022-01-10 13:47 ` [PATCH v6 2/2] block: cancel all throttled bios in del_gendisk() Yu Kuai
2022-01-12  3:05   ` Ming Lei
2022-01-13  8:46     ` yukuai (C)
2022-01-14  3:05       ` Ming Lei
2022-01-14  8:21         ` yukuai (C)
2022-01-17  9:21           ` Ming Lei
2022-01-18  8:48             ` yukuai (C)
2022-01-18 13:28               ` Ming Lei
2022-01-19  2:24                 ` yukuai (C)
2022-01-24  3:48     ` yukuai (C) [this message]
2022-01-24  3:50     ` yukuai (C)
2022-01-26 17:03       ` Tejun Heo
2022-01-27  2:45         ` yukuai (C)
2022-01-27  5:03           ` 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=96bee53a-7d3b-5066-409c-6b2f203d2137@huawei.com \
    --to=yukuai3@huawei.com \
    --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=mkoutny@suse.com \
    --cc=paulmck@kernel.org \
    --cc=tj@kernel.org \
    --cc=yi.zhang@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

all inboxes | Powered by JetHome®