From: Tejun Heo <tj@kernel.org>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: axboe@kernel.dk, chenhuacai@kernel.org, josef@toxicpanda.com,
jhs@mojatatu.com, svenjoac@gmx.de, raven@themaw.net,
pctammela@mojatatu.com, qde@naccy.de, zhaotianrui@loongson.cn,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
loongarch@lists.linux.dev, cgroups@vger.kernel.org,
yi.zhang@huawei.com, yangerkun@huawei.com,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH RFC v2 6/6] blk-throtl: switch to use rq_qos
Date: Tue, 16 Apr 2024 07:14:03 -1000 [thread overview]
Message-ID: <Zh6x21Y2T1NsaSak@slm.duckdns.org> (raw)
In-Reply-To: <ed253aa4-517c-0f56-5550-96b23093528b@huaweicloud.com>
Hello,
On Tue, Apr 16, 2024 at 10:17:29PM +0800, Yu Kuai wrote:
> > > This is a half-way conversion, right? You're adding a dedicated hook to
> > > rq_qos and none of the other hooks can be used by blk-throtl. Even
> > > the name,
>
> Actually, rq_qos_exit() is used as well for destroy blk-throtl.
I see.
> > > rq_qos_throttle_bio(), becomes a misnomer. I'm not really sure this makes
> > > things better or worse. It makes certain things a bit cleaner but other
> > > things nastier. I don't know.
> >
> > Yes, the final goal is making all blk-cgroup policies modular, and this
> > patch use rq-qos to prevent exposing blk-throtle to block layer, like
> > other policies.
>
> After thinking this a bit more, I still think probably rq_qos is a
> better choice, and there is something that I want to discuss.
>
> There are two different direction, first is swith blk-throttle to
> rq_qos_throttle() as well, which is called for each rq:
>
> 1) For, rq-based device, why blk-throtl must throttle before
> rq_qos_throttle()? And blk-throtl have to handle the bio split case
> seperately. And it looks like blk-throttle can switch to use
> rq_qos_throttle() with the benefit that io split does't need
> special handling.
>
> 2) blk-throtl treats split IO as additional iops, while it ignores
> merge IO, this looks wrong to me. If multiple bio merged into one
> request, iostat will see just one IO. And after switching to rq_qos,
> bio merge case can be handled easily as well.
If we could properly convert blk-throtl to rq-qos, that'd be great. The only
problem is that there probably are users who are using blk-throtl with
bio-based drivers because blk-throtl has supported that for a very long
time, so we're in a bit of bind for blk-throtl.
> Another is still add a rq_qos_throttle_bio(perhaps another name?), and
> meanwhile iocost can benefit from this new helper as well. Because
> iocost really is based on bio, currently it must handle the io merge
> case by debt.
I really don't think adding a different operation mode to rq-qos or iocost
is a good idea. I'd much rather keep blk-throtl where it is and come up with
a better replacement (e.g. iocost based .max throttling) in the future.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-04-16 17:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 8:00 [PATCH RFC v2 0/6] blk-throttle: support enable and disable during runtime Yu Kuai
2024-04-06 8:00 ` [PATCH RFC v2 1/6] blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW Yu Kuai
2024-04-12 17:30 ` Tejun Heo
2024-04-13 1:57 ` Yu Kuai
2024-04-16 15:47 ` Michal Koutný
2024-04-06 8:00 ` [PATCH RFC v2 2/6] blk-throttle: delay initialization until configuration Yu Kuai
2024-04-12 17:59 ` Tejun Heo
2024-04-13 1:59 ` Yu Kuai
2024-04-16 2:11 ` Yu Kuai
2024-04-16 3:05 ` Chaitanya Kulkarni
2024-04-06 8:00 ` [PATCH RFC v2 3/6] blk-throttle: expand tg_conf_updated() to return if any tg has rules Yu Kuai
2024-04-06 8:00 ` [PATCH RFC v2 4/6] blk-cgroup: add a new helper blkg_conf_exit_blkg() Yu Kuai
2024-04-06 8:00 ` [PATCH RFC v2 5/6] blk-throttle: support to destroy throtl_data when blk-throttle is disabled Yu Kuai
2024-04-12 18:05 ` Tejun Heo
2024-04-13 2:06 ` Yu Kuai
2024-04-16 17:09 ` Tejun Heo
2024-04-17 1:13 ` Yu Kuai
2024-04-17 1:22 ` Tejun Heo
2024-04-17 1:39 ` Yu Kuai
2024-04-18 2:05 ` Tejun Heo
2024-04-06 8:00 ` [PATCH RFC v2 6/6] blk-throtl: switch to use rq_qos Yu Kuai
2024-04-12 18:11 ` Tejun Heo
2024-04-13 2:17 ` Yu Kuai
2024-04-16 14:17 ` Yu Kuai
2024-04-16 17:14 ` Tejun Heo [this message]
2024-04-16 15:56 ` [PATCH RFC v2 0/6] blk-throttle: support enable and disable during runtime Michal Koutný
2024-04-17 1:09 ` Yu Kuai
2024-04-17 10:25 ` Michal Koutný
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=Zh6x21Y2T1NsaSak@slm.duckdns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=chenhuacai@kernel.org \
--cc=jhs@mojatatu.com \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=pctammela@mojatatu.com \
--cc=qde@naccy.de \
--cc=raven@themaw.net \
--cc=svenjoac@gmx.de \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.com \
--cc=zhaotianrui@loongson.cn \
/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