From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Salvatore Dipietro <dipiets@amazon.it>, willy@infradead.org
Cc: dipiets@amazon.it, 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,
stable@vger.kernel.org, vbabka@suse.com,
David Hildenbrand (Arm) <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>, Michal Hocko <mhocko@suse.com>,
Vlastimil Babka <vbabka@kernel.org>
Subject: Re: [PATCH 1/1] iomap: avoid compaction for costly folio order allocation
Date: Wed, 24 Jun 2026 17:51:18 +0530 [thread overview]
Message-ID: <o6h0w2m9.ritesh.list@gmail.com> (raw)
In-Reply-To: <20260624080639.17100-1-dipiets@amazon.it>
Salvatore Dipietro <dipiets@amazon.it> writes:
> Hi Ritesh, Matthew,
>
> I wanted to kindly follow up on my summary from May 27th regarding the best path
> forward for this patch.
>
Hi Salvatore,
Sorry about the delay. I did bring this topic up in one of our internal
ext4 community calls. And to share some context, MM community thinks we
need a better long term fix for this problem rather than patching call
sites and/or playing tricks like -
diff --git a/mm/filemap.c b/mm/filemap.c
index 4e636647100c..f2343c26dd63 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2007,8 +2007,13 @@ struct folio *__filemap_get_folio_mpol(struct address_space *mapping,
gfp_t alloc_gfp = gfp;
err = -ENOMEM;
- if (order > min_order)
- alloc_gfp |= __GFP_NORETRY | __GFP_NOWARN;
+ if (order > min_order) {
+ alloc_gfp |= __GFP_NOWARN;
+ if (order > PAGE_ALLOC_COSTLY_ORDER)
+ alloc_gfp &= ~__GFP_DIRECT_RECLAIM;
+ else
+ alloc_gfp |= __GFP_NORETRY;
+ }
Unfortunately most of the folks might be missing free cycles
to work on this problem right now :( - Hence the delay in addressing
this..
However - I would like to bring this problem to other MM community
members as well who might have an interest in this space. Can we look
into the proposed solutions from Salvatore and suggest the next steps
please?
Maybe if someone can share what is MM community looking for here - I
guess that will be a good start. Looking into the table I think
Salvatore had also shared a diff for kicking kcompactd in the background
[2].
[2]: https://lore.kernel.org/all/20260506123326.17293-1-dipiets@amazon.it/
(Sorry I still have few other things on my plate before I start look
into this more actively. But let's hear from others, who have better
knowledge than me on this.)
> To recap, we benchmarked all proposed variations and shared the results:
>
> | 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% |
>
-ritesh
next prev parent reply other threads:[~2026-06-24 14:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260403193535.9970-1-dipiets@amazon.it>
[not found] ` <20260403193535.9970-2-dipiets@amazon.it>
2026-04-04 1:13 ` [PATCH 1/1] iomap: avoid compaction for costly folio order allocation 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
2026-05-31 23:29 ` Karim Manaouil
2026-06-05 10:58 ` Salvatore Dipietro
2026-06-24 8:06 ` Salvatore Dipietro
2026-06-24 12:21 ` Ritesh Harjani [this message]
2026-06-24 13:34 ` Christoph Hellwig
[not found] ` <adLlrSZ5oRAa_Hfd@dread>
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=o6h0w2m9.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=abuehaze@amazon.com \
--cc=akpm@linux-foundation.org \
--cc=alisaidi@amazon.com \
--cc=blakgeof@amazon.com \
--cc=brauner@kernel.org \
--cc=david@kernel.org \
--cc=dipietro.salvatore@gmail.com \
--cc=dipiets@amazon.it \
--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=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vbabka@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