Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] mm: fix reclaim storms in defrag_mode
@ 2026-06-26 18:21 Johannes Weiner
  2026-06-26 18:21 ` [PATCH 1/4] mm: page_alloc: __GFP_FS lockdep annotation for direct compaction Johannes Weiner
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Johannes Weiner @ 2026-06-26 18:21 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka
  Cc: Suren Baghdasaryan, Michal Hocko, Brendan Jackman, Zi Yan,
	David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
	Mike Rapoport, linux-mm, linux-kernel

As we deployed vm.defrag_mode=1 into Meta production, some workloads
regressed with recurring pressure spikes and swap storms (which in turn
triggered userspace OOM rules on pressure and swap utilization levels).

Tracing pinned this to non-movable requests spinning and reclaiming
unproductively when kswapd/kcompactd are overwhelmed. Direct reclaim
predominantly frees up pages in movable blocks, but those requests
cannot use that space under defrag_mode rules; and it is unlikely to
free up whole blocks incidentally for __rmqueue_claim() to work.

This series fixes it by making non-movable requests participate in
pageblock production in the allocator slowpath.

That requires some small-ish adjustments up front in the allocator and
the compaction code: three prep patches and the fix last.

The series has been in production against one of the affected workloads
for two weeks and restores the OOM kill rate to !defrag_mode baseline.

Based on mm-new (2026-06-22).

 include/linux/compaction.h |  3 +-
 mm/compaction.c            | 68 ++++++++++++++++++++++++--------------------
 mm/internal.h              |  7 +++++
 mm/page_alloc.c            | 59 ++++++++++++++++++++++++++++++------
 4 files changed, 98 insertions(+), 39 deletions(-)



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-26 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 18:21 [PATCH 0/4] mm: fix reclaim storms in defrag_mode Johannes Weiner
2026-06-26 18:21 ` [PATCH 1/4] mm: page_alloc: __GFP_FS lockdep annotation for direct compaction Johannes Weiner
2026-06-26 18:21 ` [PATCH 2/4] mm: compaction: support non-movable compaction for pageblock requests Johannes Weiner
2026-06-26 18:21 ` [PATCH 3/4] mm: page_alloc: move capture_control to the page allocator Johannes Weiner
2026-06-26 18:21 ` [PATCH 4/4] mm: page_alloc: fix non-movable reclaim storm in defrag_mode Johannes Weiner
2026-06-26 18:29   ` Zi Yan
2026-06-26 18:43     ` Johannes Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox