Re: [PATCH 2/3] writeback: allow the file system to override MIN_WRITEBACK_PAGES

Christoph Hellwig
2025-10-16T04:40:04Z

On Thu, Oct 16, 2025 at 07:49:20AM +1100, Dave Chinner wrote:
> On Wed, Oct 15, 2025 at 03:27:15PM +0900, Christoph Hellwig wrote:
> > The relatively low minimal writeback size of 4MiB leads means that
> > written back inodes on rotational media are switched a lot. Besides
> > introducing additional seeks, this also can lead to extreme file
> > fragmentation on zoned devices when a lot of files are cached relative
> > to the available writeback bandwidth.
> >
> > Add a superblock field that allows the file system to override the
> > default size.
>
> Hmmm - won't changing this for the zoned rtdev also change behaviour
> for writeback on the data device? i.e. upping the minimum for the
> normal data device on XFS will mean writeback bandwidth sharing is a
> lot less "fair" and higher latency when we have a mix of different
> file sizes than it currently is...

In theory it is. In practice with a zoned file system the main device
is:

a) typically only used for metadata
b) a fast SSD when not actually on the same device

So I think these concerns are valid, but not really worth replacing the
simple superblock field with a method to query the value. But I'll write
a comment documenting these assumptions as that is useful for future
readers of the code.

>
> -Dave.
> --
> Dave Chinner
> david@fromorbit.com
---end quoted text---