Re: [PATCH 00/13] Parallelizing filesystem writeback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 3, 2025 at 7:35 PM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Tue, Jun 03, 2025 at 04:04:45PM +0200, Christoph Hellwig wrote:
> > On Tue, Jun 03, 2025 at 07:22:18PM +0530, Anuj gupta wrote:
> > > > A mount option is about the worst possible interface for behavior
> > > > that depends on file system implementation and possibly hardware
> > > > chacteristics.  This needs to be set by the file systems, possibly
> > > > using generic helpers using hardware information.
> > >
> > > Right, that makes sense. Instead of using a mount option, we can
> > > introduce generic helpers to initialize multiple writeback contexts
> > > based on underlying hardware characteristics — e.g., number of CPUs or
> > > NUMA topology. Filesystems like XFS and EXT4 can then call these helpers
> > > during mount to opt into parallel writeback in a controlled way.
> >
> > Yes.  A mount option might still be useful to override this default,
> > but it should not be needed for the normal use case.
>
> .. actually a sysfs file on the bdi is probably the better interface
> for the override than a mount option.

Hi Christoph,

Thanks for the suggestion — I agree the default should come from a
filesystem-level helper, not a mount option.

I looked into the sysfs override idea, but one challenge is that
nr_wb_ctx must be finalized before any writes occur. That leaves only
a narrow window — after the bdi is registered but before any inodes
are dirtied — where changing it is safe.

This makes the sysfs knob a bit fragile unless we tightly guard it
(e.g., mark it read-only after init). A mount option, even just as an
override, feels simpler and more predictable, since it’s set before
the FS becomes active.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux