From: Zhaoyang Huang <huangzhaoyang@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-mm@kvack.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
steve.kang@unisoc.com
Subject: Re: [RFC PATCH 2/2] mm: introduce budgt control in readahead
Date: Wed, 15 May 2024 16:17:32 +0800 [thread overview]
Message-ID: <CAGWkznEbN4UFCS2LQkGMjXeFXFmDBva9pT0fTjX7+mcP2qAiLQ@mail.gmail.com> (raw)
In-Reply-To: <ZkRnCDasZNvFQUaY@slm.duckdns.org>
On Wed, May 15, 2024 at 3:40 PM Tejun Heo <tj@kernel.org> wrote:
>
> Hello,
>
> On Wed, May 15, 2024 at 09:23:50AM +0800, zhaoyang.huang wrote:
> > +static unsigned long get_next_ra_size(struct readahead_control *ractl,
> > unsigned long max)
> > {
> > + unsigned long cur = ractl->ra->size;
> > + struct inode *inode = ractl->mapping->host;
> > + unsigned long budgt = inode->i_sb->s_bdev ?
> > + blk_throttle_budgt(inode->i_sb->s_bdev) : 0;
>
> Technical correctness aside, I'm not convinced it's generally a good idea to
> bubble up one specific IO control mechanism's detail all the way upto RA
> layer. Besides what's the gain here? For continuous IO stream, whether some
> RA bios are oversized or not shouldn't matter, no? Doesn't this just affect
> the accuracy of the last RA IO of a finite read stream?
Thanks for feedback. If I understand right, the oversized RA bios of a
finite read will fail by being queued to tg's queue which should be
deemed as introducing a drop of IOPS.
submit_bio
blk_throtl_bio
if(!tg_may_dispatch) //failed, queue the bio to tg's queue
What we get here is a more precise BW of the throttled blkcg like
below, from which we can find the result of 'after' could exactly meet
the configured bps value and a little bit enhancement since there are
no hung(oversized) bios any more.
blkio.throttle.read_bps_device = 20MB/s
fio ... -numjobs=8 ...
before : IOPS=37.9k, BW=148MiB/s (155MB/s)(11.6GiB/80333msec)
after : IOPS=39.0k, BW=153MiB/s (160MB/s)(15.6GiB/104914msec)
before : clat (usec): min=4, max=1056.6k, avg=197.23, stdev=10080.69
after : clat (usec): min=4, max=193481, avg=188.83, stdev=4651.29
before : lat (usec): min=5, max=1056.6k, avg=200.48, stdev=10080.76
after : lat (usec): min=5, max=193483, avg=192.68, stdev=4651.87
blkio.throttle.read_bps_device = 30MB/s
fio ... -numjobs=8 ...
before : IOPS=57.2k, BW=224MiB/s (234MB/s)(15.6GiB/71561msec)
after : IOPS=58.5k, BW=229MiB/s (240MB/s)(15.6GiB/69996msec)
before : clat (usec): min=4, max=1105.5k, avg=126.20, stdev=6419.22
after : clat (usec): min=4, max=183956, avg=120.60, stdev=2957.28
before : lat (usec): min=5, max=1105.5k, avg=129.45, stdev=6419.29
after : lat (usec): min=5, max=183958, avg=124.40, stdev=2958.18
>
> Thanks. blk_throttle_budgt
>
> --
> tejun
next prev parent reply other threads:[~2024-05-15 8:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-15 1:23 [RFC PATCH 0/2] introduce precised blk-throttle control zhaoyang.huang
2024-05-15 1:23 ` [RFC PATCH 1/2] block: introduce helper function to calculate bps budgt zhaoyang.huang
2024-05-15 1:23 ` [RFC PATCH 2/2] mm: introduce budgt control in readahead zhaoyang.huang
2024-05-15 4:09 ` Matthew Wilcox
2024-05-15 6:31 ` Zhaoyang Huang
2024-05-15 7:40 ` Tejun Heo
2024-05-15 8:17 ` Zhaoyang Huang [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-09 2:39 [RFC PATCH 0/2] " zhaoyang.huang
2024-05-09 2:39 ` [RFC PATCH 2/2] mm: " zhaoyang.huang
2024-05-09 3:15 ` Matthew Wilcox
2024-05-10 2:43 ` Zhaoyang Huang
2024-05-10 3:18 ` Matthew Wilcox
2024-05-11 7:35 ` Zhaoyang Huang
2024-05-14 2:37 ` Zhaoyang Huang
2024-05-09 12:39 ` Christoph Hellwig
2024-05-10 3:06 ` Zhaoyang Huang
2024-05-10 4:14 ` Matthew Wilcox
2024-05-10 7:08 ` Zhaoyang Huang
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=CAGWkznEbN4UFCS2LQkGMjXeFXFmDBva9pT0fTjX7+mcP2qAiLQ@mail.gmail.com \
--to=huangzhaoyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baolin.wang@linux.alibaba.com \
--cc=cgroups@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=steve.kang@unisoc.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
--cc=zhaoyang.huang@unisoc.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