Re: [RFC PATCH 2/2] filemap: use high-order folios in filemap sync RA

Matthew Wilcox
2026-04-16T17:58:38Z

On Thu, Apr 16, 2026 at 01:30:32PM +0800, Barry Song wrote:
> > Or introduce some dedicated tunable like "sync_mmap_order".
>
> I guess we could benefit from a small order, such as 1 or 2.
> Order 4 is really too large for many systems, such as Android.
>
> But it seems Matthew never likes new control knobs?

Correct. It moves the burden to the sysadmin. And either there isn't
one (eg Android), or the sysadmin does not have enough information to
set it correctly, and doesn't have the time to know that it even exists.

We need to be self-tuning. There's no other way.

Now, that control loop could run in user-space. And if it does, then
we'd need the kernel to expose a control knob for the daemon to tweak.
But then the daemon has to come first, not the control knob with a vague
promise of a daemon to appear in future. Preferably it's part of some
userspace collection of utilities that already exists like util-linux
or systemd, so we're not relying on people finding & installing some
new thing (that again they won't know they need).

THPs in particular have accumulated way too much cruft over the years,
and there's a huge amount of misinformation floating around on random
webpages about how to configure them. I think we'd be much better off
just ignoring all of the knobs that we've put in.