Skip to content

RFC Fix excessive CPU usage during compaction

Mel Gorman linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] mm-compaction-finish-pageblocks-on-complete-migration-failure.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 9 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4mm, compaction: Rename compact_control->rescan to finish_pageblockmm/compaction.c mm/internal.h+17 -131 replyApplied
2/4mm, compaction: Check if a page has been captured before draining PCP pagesmm/compaction.c+6 -61 replyApplied
3/4mm, compaction: Finish scanning the current pageblock if requestedmm/compaction.c+7 -01 replyApplied
4/4mm, compaction: Finish pageblocks on complete migration failuremm/compaction.c+22 -82 repliesApplied

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchVlastimil Babka
1/4A-b
2/4A-b
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/4] Fix excessive CPU usage during compaction

Commit 7efc3b726103 ("mm/compaction: fix set skip in fast_find_migrateblock") fixed a problem where pageblocks found by fast_find_migrateblock() were ignored. Unfortunately there were numerous bug reports complaining about high CPU usage and massive stalls once 6.1 was released. Due to the severity, the patch was reverted by Vlastimil as a short-term fix[1] to -stable and is currently sitting in the Andrew's git branch mm/mm-hotfixes-unstable.

The underlying problem for each of the bugs is suspected to be the repeated scanning of the same pageblocks. This series should guarantee forward progress even with commit 7efc3b726103. More information is in the changelog for patch 4.

If this series is accepted and merged after the revert of 7efc3b726103 then a "revert of the revert" will be needed.

[1] http://lore.kernel.org/r/[email protected]

 mm/compaction.c | 73 +++++++++++++++++++++++++++++++------------------
 mm/internal.h   |  6 +++-
 2 files changed, 52 insertions(+), 27 deletions(-)
Signature · 15 lines
2.35.3

Mel Gorman (4):
  mm, compaction: Rename compact_control->rescan to finish_pageblock
  mm, compaction: Check if a page has been captured before draining PCP
    pages
  mm, compaction: Finish scanning the current pageblock if requested
  mm, compaction: Finish pageblocks on complete migration failure

 mm/compaction.c | 73 +++++++++++++++++++++++++++++++------------------
 mm/internal.h   |  6 +++-
 2 files changed, 52 insertions(+), 27 deletions(-)

-- 
2.35.3