From: Salvatore Dipietro <dipiets@amazon.it>
To: <dipiets@amazon.it>
Cc: <abuehaze@amazon.com>, <akpm@linux-foundation.org>,
<alisaidi@amazon.com>, <blakgeof@amazon.com>,
<brauner@kernel.org>, <dipietro.salvatore@gmail.com>,
<djwong@kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<linux-xfs@vger.kernel.org>, <ritesh.list@gmail.com>,
<stable@vger.kernel.org>, <vbabka@suse.com>,
<willy@infradead.org>
Subject: Re: [PATCH 1/1] iomap: avoid compaction for costly folio order allocation
Date: Wed, 27 May 2026 16:24:10 +0000 [thread overview]
Message-ID: <20260527162412.19922-1-dipiets@amazon.it> (raw)
In-Reply-To: <20260506123326.17293-1-dipiets@amazon.it>
Thanks Ritesh and Matthew for the continued feedback and guidance on this thread.
I'd like to summarize where we stand and ask for your input on the best path forward.
Summary of approaches tested:
We've now benchmarked all proposed variations (pgbench simple-update, 1024 clients,
96-vCPU arm64, huge_pages=off, PREEMPT_NONE applied [1]):
| Patch | Change Location | Avg TPS | % vs Baseline |
|--------------------------------|-----------------------|-----------:|:-------------:|
| Baseline (no patch) | — | 101,979.75 | — |
| v1 (original, iomap caller) | fs/iomap/buffered-io.c| 141,194.20 | +38.45% |
| Ritesh's suggestion | mm/filemap.c | 139,200.61 | +36.50% |
| Matthew's suggestion | mm/filemap.c | 143,863.82 | +41.07% |
| kcompactd background | mm/page_alloc.c | 134,278.47 | +31.67% |
All approaches recover significant throughput. The kcompactd approach (background
compaction and returning nopage for costly orders with __GFP_NORETRY) aligns with the
architectural direction Dave and Christoph proposed, keeping compaction out of the direct
reclaim path, and lives entirely in the page allocator.
Based on the discussion, I see two possible directions and would appreciate your guidance:
1. Page allocator fix (mm/page_alloc.c): The kcompactd background approach addresses
Matthew's concern that filemap.c shouldn't know about PAGE_ALLOC_COSTLY_ORDER, and aligns
with Dave's vision of removing compaction from the direct reclaim path.
2. filemap fix (mm/filemap.c): Both Ritesh's and Matthew's suggestions are minimal,
backportable, and preserve lightweight reclaim for non-costly orders.
Ritesh's variant differentiates between costly and non-costly orders, while Matthew's
is simpler and performs best.
Would either of these directions be acceptable for a v3, or would you prefer a different approach?
I'm happy to test any additional variations or direction to move this forward
Salvatore
[1] https://lore.kernel.org/all/20260403191942.21410-1-dipiets@amazon.it/T/#m8baeeaf48aa7ae5342c8c2db8f4e1c27e03c1368
AMAZON DEVELOPMENT CENTER ITALY SRL, viale Monte Grappa 3/5, 20124 Milano, Italia, Registro delle Imprese di Milano Monza Brianza Lodi REA n. 2504859, Capitale Sociale: 10.000 EUR i.v., Cod. Fisc. e P.IVA 10100050961, Societa con Socio Unico
next prev parent reply other threads:[~2026-05-27 16:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 19:35 [PATCH 0/1] iomap: avoid compaction for costly folio order allocation Salvatore Dipietro
2026-04-03 19:35 ` [PATCH 1/1] " Salvatore Dipietro
2026-04-04 1:13 ` Ritesh Harjani
2026-04-04 4:15 ` Matthew Wilcox
2026-04-04 16:47 ` Ritesh Harjani
2026-04-04 20:46 ` Matthew Wilcox
2026-04-16 15:14 ` Ritesh Harjani
2026-04-20 16:33 ` Salvatore Dipietro
2026-04-20 18:44 ` Matthew Wilcox
2026-04-21 1:16 ` Ritesh Harjani
2026-04-28 15:02 ` Salvatore Dipietro
2026-05-03 5:52 ` Ritesh Harjani
2026-05-03 11:55 ` Matthew Wilcox
2026-05-06 12:33 ` Salvatore Dipietro
2026-05-27 16:24 ` Salvatore Dipietro [this message]
2026-05-31 23:29 ` Karim Manaouil
2026-06-05 10:58 ` Salvatore Dipietro
2026-04-05 22:43 ` Dave Chinner
2026-04-07 5:40 ` Christoph Hellwig
2026-04-21 9:02 ` Vlastimil Babka
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=20260527162412.19922-1-dipiets@amazon.it \
--to=dipiets@amazon.it \
--cc=abuehaze@amazon.com \
--cc=akpm@linux-foundation.org \
--cc=alisaidi@amazon.com \
--cc=blakgeof@amazon.com \
--cc=brauner@kernel.org \
--cc=dipietro.salvatore@gmail.com \
--cc=djwong@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ritesh.list@gmail.com \
--cc=stable@vger.kernel.org \
--cc=vbabka@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox