From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>, Mike Snitzer <snitzer@redhat.com>,
linux-block@vger.kernel.org, dm-devel@redhat.com,
lining <lining2020x@163.com>, Tejun Heo <tj@kernel.org>,
Chunguang Xu <brookxu@tencent.com>
Subject: Re: [PATCH 1/2] block: add resubmit_bio_noacct()
Date: Tue, 11 Jan 2022 09:56:36 +0800 [thread overview]
Message-ID: <Ydzj1JSoRGz+9g8B@T590> (raw)
In-Reply-To: <YdxuWlZAPJkPyr3h@infradead.org>
On Mon, Jan 10, 2022 at 09:35:22AM -0800, Christoph Hellwig wrote:
> On Mon, Jan 10, 2022 at 03:51:40PM +0800, Ming Lei wrote:
> > Add block layer API of resubmit_bio_noacct() for handling blk-throttle
> > iops limit correctly. Typical use case is that bio split, and it isn't
> > good to export blk_throtl_charge_bio_split() for drivers, so add new API
> > for serving such purpose.
>
> Umm, submit_bio_noacct is meant exactly for this case of resubmitting
> a bio. We should not need another API for that.
Follows the background of the issue first:
1) IOPS limit throttle needs to cover split bio since iostat accounts
split bio actually, and user space setup iops limit throttle by the
feedback from iostat/diskstat;
2) block throttle is block layer internal stuff, and we shouldn't expose
blk_throtl_charge_bio_split() to driver.
Maybe rename the new API as submit_split_bio_noacct(), but we can't
reuse submit_bio_noacct() simply, otherwise blk_throtl_charge_bio_split()
needs to be exported.
Another ides is to clearing BIO_THROTTLED before calling submit_bio_noacct(),
meantime blk-throttle code needs to change to avoid double accounting of bio
bytes, so the caller of submit_bio_noacct() still needs some change.
This way can get smooth IOPS throttle, but needs to call __blk_throtl_bio
for split bio one more time.
Or other idea for this bio split vs. iops limit issue?
Thanks,
Ming
next prev parent reply other threads:[~2022-01-11 1:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 7:51 [PATCH 0/2] block/dm: add resubmit_bio_noacct for fixing iops throttling Ming Lei
2022-01-10 7:51 ` [PATCH 1/2] block: add resubmit_bio_noacct() Ming Lei
2022-01-10 17:35 ` Christoph Hellwig
2022-01-10 19:03 ` Mike Snitzer
2022-01-11 2:26 ` Ming Lei
2022-01-11 8:36 ` [dm-devel] " Christoph Hellwig
2022-01-11 1:56 ` Ming Lei [this message]
2022-01-11 8:42 ` Christoph Hellwig
2022-01-10 7:51 ` [PATCH 2/2] dm: use resubmit_bio_noacct to submit split bio 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=Ydzj1JSoRGz+9g8B@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=brookxu@tencent.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=lining2020x@163.com \
--cc=linux-block@vger.kernel.org \
--cc=snitzer@redhat.com \
--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