From: Christoph Hellwig <hch@lst.de>
To: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>, Carlos Maiolino <cem@kernel.org>,
Filip Blagojevic <filip.blagojevic@wdc.com>,
Matthew Wilcox <willy@infradead.org>,
Damien Le Moal <dlemoal@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: update BDI {io,ra}_pages values based on the RT device limits
Date: Wed, 24 Jun 2026 15:49:50 +0200 [thread overview]
Message-ID: <20260624134950.GA6471@lst.de> (raw)
In-Reply-To: <rbrncqfmzbnj5o2yvieqtpl3dkb4qzafsai3sarmbta4fsqc6f@yruai3zv5llu>
On Wed, Jun 24, 2026 at 02:26:35PM +0200, Jan Kara wrote:
> A cleaner but still relatively simple way how to fix your problem would be
> to do something similar like e.g. btrfs does. That is when you have a
> filesystem with multiple backing devices, you create a new BDI (using
> super_setup_bdi()) and set its parameters based on the combination of
> devices you have.
>
> The only downside to this is that blk-wbt has a layering violation in it
> when it tries to guess whether there are task dirty-throttled for the
> device which stops working for when the filesystem uses this synthetic bdi.
> But I don't think that's too serious to worry about.
The big downside of that is that it breaks the userspace ABI - any
previous changes to BDI paramters, most importantly the read-ahead size,
would now only apply to the BDI for s_bdev which isn't actually used
by anything.
And yeah, the blk-wbt thing actually looks really broken and could use
fixing..
> > 1) support multiple BDIs per file system.
> >
> > This would work pretty well for XFS, as data for a given file is
> > always entirely on one device, and the VFS writeback code is not
> > used for metadata. But it probably doesn't work well for other
> > cases
>
> Since looking up the bdi is abstracted through inode_to_bdi() (which
> currently goes through the superblock), this would be relatively easy to do
> but either the inode would have to store the bdi pointer or we'd have to
> have an operation to query it. Just at this point I'm not fully convinced
> the additional complexity / memory cost is worth it compared to what can be
> achieved with a synthetic bdi.
Same.
> > 2) stop propagating these values through the BDI
> >
> > Have a way to query these parameters from the file system, either
> > through a method if we want to be fully dynamic, or through fields
> > instead of going through the BDI. The downside would be that
> > sysfs modifications of the readahead size would not work after
> > the file system initially queried them.
>
> Similarly as above. It makes sense but I'm not sure there are strong enough
> usecases to justify this.
It would at least be a lot less complete than option 1. And get us out of
a bit more of all that bdi weirdness.
prev parent reply other threads:[~2026-06-24 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 14:21 update BDI {io,ra}_pages values based on the RT device limits Christoph Hellwig
2026-06-23 14:21 ` [PATCH] xfs: " Christoph Hellwig
2026-06-24 10:40 ` Carlos Maiolino
2026-06-24 15:42 ` Christoph Hellwig
2026-06-24 12:26 ` Jan Kara
2026-06-24 13:49 ` Christoph Hellwig [this message]
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=20260624134950.GA6471@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=dlemoal@kernel.org \
--cc=filip.blagojevic@wdc.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.