The patch titled Subject: mm/vmscan: delay waking of tasks throttled on NOPROGRESS has been added to the -mm tree. Its filename is mm-vmscan-delay-waking-of-tasks-throttled-on-noprogress.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-delay-waking-of-tasks-throttled-on-noprogress.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-delay-waking-of-tasks-throttled-on-noprogress.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Subject: mm/vmscan: delay waking of tasks throttled on NOPROGRESS Tracing indicates that tasks throttled on NOPROGRESS are woken prematurely resulting in occasional massive spikes in direct reclaim activity. This patch wakes tasks throttled on NOPROGRESS if reclaim efficiency is at least 12%. Link: https://lkml.kernel.org/r/20211022144651.19914-9-mgorman@xxxxxxxxxxxxxxxxxxx Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Cc: Andreas Dilger <adilger.kernel@xxxxxxxxx> Cc: "Darrick J . Wong" <djwong@xxxxxxxxxx> Cc: Dave Chinner <david@xxxxxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: NeilBrown <neilb@xxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxxx> Cc: "Theodore Ts'o" <tytso@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/mm/vmscan.c~mm-vmscan-delay-waking-of-tasks-throttled-on-noprogress +++ a/mm/vmscan.c @@ -3355,8 +3355,11 @@ static inline bool compaction_ready(stru static void consider_reclaim_throttle(pg_data_t *pgdat, struct scan_control *sc) { - /* If reclaim is making progress, wake any throttled tasks. */ - if (sc->nr_reclaimed) { + /* + * If reclaim is making progress greater than 12% efficiency then + * wake all the NOPROGRESS throttled tasks. + */ + if (sc->nr_reclaimed > (sc->nr_scanned >> 3)) { wait_queue_head_t *wqh; wqh = &pgdat->reclaim_wait[VMSCAN_THROTTLE_NOPROGRESS]; _ Patches currently in -mm which might be from mgorman@xxxxxxxxxxxxxxxxxxx are mm-vmscan-throttle-reclaim-until-some-writeback-completes-if-congested.patch mm-vmscan-throttle-reclaim-and-compaction-when-too-may-pages-are-isolated.patch mm-vmscan-throttle-reclaim-when-no-progress-is-being-made.patch mm-writeback-throttle-based-on-page-writeback-instead-of-congestion.patch mm-page_alloc-remove-the-throttling-logic-from-the-page-allocator.patch mm-vmscan-centralise-timeout-values-for-reclaim_throttle.patch mm-vmscan-increase-the-timeout-if-page-reclaim-is-not-making-progress.patch mm-vmscan-delay-waking-of-tasks-throttled-on-noprogress.patch