Re: [PATCH v2] mm/filemap: avoid costly reclaim for high-order folio allocations

Matthew Wilcox
2026-04-20T18:41:10Z

On Mon, Apr 20, 2026 at 09:51:06AM -0700, Andrew Morton wrote:
> On Mon, 20 Apr 2026 16:14:03 +0000 Salvatore Dipietro <dipiets@amazon.it> wrote:
> > Commit 5d8edfb900d5 ("iomap: Copy larger chunks from userspace")
> > introduced high-order folio allocations in the buffered write path.

No it didn't. 5d8edfb900d5 only allows the use of larger folios if they
already existed in the page cache. d6bb59a9444d allows the creation of
large folios.

> > When memory is fragmented, each failed allocation above
> > PAGE_ALLOC_COSTLY_ORDER triggers compaction and drain_all_pages() via
> > __alloc_pages_slowpath(), causing a 0.75x throughput drop on pgbench
> > (simple-update) with 1024 clients on a 96-vCPU arm64 system.

Why are you pretending this is new instead of already being the source
of much recent discussion?

https://lore.kernel.org/all/20260403193535.9970-1-dipiets@amazon.it/

> "Good money after bad"? Prove me wrong!
>
> Instead of performing weird fragile hard-to-maintain party tricks with
> the page allocator to work around the damage, plan B is to simply
> revert 5d8edfb900d5.

lol. best of luck with that. you'd break a lot of other things if you
did.

> 5d8edfb900d5 came with no performance testing results. Does anyone
> have any evidence that it improved anything? By how much?

Christoph reported it doubled write performance with NFS once NFS was
converted to use it.