Skip to content

RFC Remove dependency on congestion_wait in mm/

Mel Gorman linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5mm/vmscan: Throttle reclaim until some writeback completes if congestedinclude/linux/backing-dev.h include/linux/mmzone.h include/trace/events/vmscan.h +7 more+105 -6410 replies
2/5mm/vmscan: Throttle reclaim and compaction when too may pages are isolatedinclude/linux/mmzone.h include/trace/events/vmscan.h mm/compaction.c +3 more+30 -104 replies
3/5mm/vmscan: Throttle reclaim when no progress is being madeinclude/linux/mmzone.h include/trace/events/vmscan.h mm/memcontrol.c +1 more+43 -104 replies
4/5mm/writeback: Throttle based on page writeback instead of congestionmm/page-writeback.c+9 -20 replies
5/5mm/page_alloc: Remove the throttling logic from the page allocatormm/page_alloc.c+1 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Remove dependency on congestion_wait in mm/

Cc list similar to "congestion_wait() and GFP_NOFAIL" as they're loosely related.

This is a prototype series that removes all calls to congestion_wait in mm/ and deletes wait_iff_congested. It's not a clever implementation but congestion_wait has been broken for a long time
(https://lore.kernel.org/linux-mm/[email protected]/).
Even if it worked, it was never a great idea. While excessive dirty/writeback pages at the tail of the LRU is one possibility that reclaim may be slow, there is also the problem of too many pages being isolated and reclaim failing for other reasons (elevated references, too many pages isolated, excessive LRU contention etc).

This series replaces the reclaim conditions with event driven ones

o If there are too many dirty/writeback pages, sleep until a timeout or enough pages get cleaned
o If too many pages are isolated, sleep until enough isolated pages are either reclaimed or put back on the LRU
o If no progress is being made, let direct reclaim tasks sleep until another task makes progress

This has been lightly tested only and the testing was useless as the relevant code was not executed. The workload configurations I had that used to trigger these corner cases no longer work (yey?) and I'll need to implement a new synthetic workload. If someone is aware of a realistic workload that forces reclaim activity to the point where reclaim stalls then kindly share the details.

Signature · 28 lines
2.31.1

Mel Gorman (5):
  mm/vmscan: Throttle reclaim until some writeback completes if
    congested
  mm/vmscan: Throttle reclaim and compaction when too may pages are
    isolated
  mm/vmscan: Throttle reclaim when no progress is being made
  mm/writeback: Throttle based on page writeback instead of congestion
  mm/page_alloc: Remove the throttling logic from the page allocator

 include/linux/backing-dev.h      |   1 -
 include/linux/mmzone.h           |  12 ++++
 include/trace/events/vmscan.h    |  38 +++++++++++
 include/trace/events/writeback.h |   7 --
 mm/backing-dev.c                 |  48 --------------
 mm/compaction.c                  |   2 +-
 mm/filemap.c                     |   1 +
 mm/internal.h                    |  11 ++++
 mm/memcontrol.c                  |  10 +--
 mm/page-writeback.c              |  11 +++-
 mm/page_alloc.c                  |  26 ++------
 mm/vmscan.c                      | 110 ++++++++++++++++++++++++++++---
 mm/vmstat.c                      |   1 +
 13 files changed, 180 insertions(+), 98 deletions(-)

-- 
2.31.1