mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress.patch removed from -mm tree
The patch titled
Subject: mm: vmscan: reduce throttling due to a failure to make progress
has been removed from the -mm tree. Its filename was
mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm: vmscan: reduce throttling due to a failure to make progress
Mike Galbraith, Alexey Avramov and Darrick Wong all reported similar problems due to reclaim throttling for excessive lengths of time. In Alexey's case, a memory hog that should go OOM quickly stalls for several minutes before stalling. In Mike and Darrick's cases, a small memcg environment stalled excessively even though the system had enough memory overall.
Commit 69392a403f49 ("mm/vmscan: throttle reclaim when no progress is being made") introduced the problem although commit a19594ca4a8b ("mm/vmscan: increase the timeout if page reclaim is not making progress") made it worse. Systems at or near an OOM state that cannot be recovered must reach OOM quickly and memcg should kill tasks if a memcg is near OOM.
To address this, only stall for the first zone in the zonelist, reduce the timeout to 1 tick for VMSCAN_THROTTLE_NOPROGRESS and only stall if the scan control nr_reclaimed is 0, kswapd is still active and there were excessive pages pending for writeback. If kswapd has stopped reclaiming due to excessive failures, do not stall at all so that OOM triggers relatively quickly. Similarly, if an LRU is simply congested, only lightly throttle similar to NOPROGRESS.
Alexey's original case was the most straight forward
for i in {1..3}; do tail /dev/zero; done
On vanilla 5.16-rc1, this test stalled heavily, after the patch the test completes in a few seconds similar to 5.15.
Alexey's second test case added watching a youtube video while tail runs 10 times. On 5.15, playback only jitters slightly, 5.16-rc1 stalls a lot with lots of frames missing and numerous audio glitches. With this patch applies, the video plays similarly to 5.15.
---
include/linux/mmzone.h | 1 include/trace/events/vmscan.h | 4 +- mm/vmscan.c | 64 +++++++++++++++++++++++++++----- 3 files changed, 59 insertions(+), 10 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress +1 -0
@@ -277,6 +277,7 @@ enum vmscan_throttle_state {VMSCAN_THROTTLE_WRITEBACK ,VMSCAN_THROTTLE_ISOLATED ,VMSCAN_THROTTLE_NOPROGRESS , +VMSCAN_THROTTLE_CONGESTED , NR_VMSCAN_THROTTLE, };
include/trace/events/vmscan.h renamed from include/trace/events/vmscan.h~mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress +3 -1
@@ -30,12 +30,14 @@#define _VMSCAN_THROTTLE_WRITEBACK (1 << VMSCAN_THROTTLE_WRITEBACK)#define _VMSCAN_THROTTLE_ISOLATED (1 << VMSCAN_THROTTLE_ISOLATED)#define _VMSCAN_THROTTLE_NOPROGRESS (1 << VMSCAN_THROTTLE_NOPROGRESS) +#define _VMSCAN_THROTTLE_CONGESTED (1 << VMSCAN_THROTTLE_CONGESTED)#define show_throttle_flags (flags) \ (flags) ? __print_flags(flags, "|", \ {_VMSCAN_THROTTLE_WRITEBACK, "VMSCAN_THROTTLE_WRITEBACK"}, \ {_VMSCAN_THROTTLE_ISOLATED, "VMSCAN_THROTTLE_ISOLATED"}, \ - {_VMSCAN_THROTTLE_NOPROGRESS, "VMSCAN_THROTTLE_NOPROGRESS"} \ + {_VMSCAN_THROTTLE_NOPROGRESS, "VMSCAN_THROTTLE_NOPROGRESS"}, \ + {_VMSCAN_THROTTLE_CONGESTED, "VMSCAN_THROTTLE_CONGESTED"} \ ) : "VMSCAN_THROTTLE_NONE"
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress +55 -9
112 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix.patch