Skip to content

mm/page_alloc: fix iomap buffered write regression from 5d8edfb900d5

Salvatore Dipietro linux-mm stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm: page_alloc: do not give all non-blocking requests reserve accessmm/internal.h mm/page_alloc.c+6 -10 replies
2/3mm: page_alloc: remove ALLOC_NON_BLOCK from ALLOC_RESERVESmm/internal.h+5 -60 replies
3/3mm/page_alloc: avoid direct reclaim and compaction for costly __GFP_NORETRY allocationsmm/page_alloc.c+11 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBalbir SinghVlastimil Babka (SUSE)Zi YanJohannes WeinerChristoph Hellwig
SeriesA-b R-b A-b A-b R-b R-b
1/3A-b R-b
2/3A-b R-b
3/3A-b A-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 6.18.y 0/3] mm/page_alloc: fix iomap buffered write regression from 5d8edfb900d5

Backport of 0e05a469c294 ("mm/page_alloc: avoid direct reclaim and compaction for costly __GFP_NORETRY allocations") to 6.18.y. It fixes a regression from 5d8edfb900d5 ("iomap: Copy larger chunks from userspace", v6.6), which slows buffered writes under memory fragmentation. Andrew and Vlastimil agreed it should go to stable [1].

Patches 1-2 are its prerequisites from the same mainline merge (Cc:
stable), only moved from mm/page_alloc.h to mm/internal.h. Patch 3 is adjusted for this tree, see its changelog. Acks from Vlastimil and Johannes on these adjustments would be appreciated.

Built, booted and tested with pgbench simple-update (PostgreSQL 18.6, 1024 clients, 96 threads, 1200s) on m8g.24xlarge (96 vCPU arm64), 12x io2 RAID0 XFS, mean of 3 runs:

v6.18.63 87,278 TPS
v6.18.63 + series 154,670 TPS (+77.2%)

[1] https://lore.kernel.org/all/[email protected]/

Johannes Weiner (2):
mm: page_alloc: do not give all non-blocking requests reserve access
mm: page_alloc: remove ALLOC_NON_BLOCK from ALLOC_RESERVES

Salvatore Dipietro (1):
mm/page_alloc: avoid direct reclaim and compaction for costly
__GFP_NORETRY allocations

 mm/internal.h   | 14 ++++++++------
 mm/page_alloc.c | 16 ++++++++++++++--
 2 files changed, 22 insertions(+), 8 deletions(-)
Signature · 6 lines
2.50.1




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