The patch titled Subject: mm: vmscan: reduce throttling due to a failure to make progress -fix has been added to the -mm tree. Its filename is mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix.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: reduce throttling due to a failure to make progress -fix Hugh Dickins reported the following My tmpfs swapping load (tweaked to use huge pages more heavily than in real life) is far from being a realistic load: but it was notably slowed down by your throttling mods in 5.16-rc, and this patch makes it well again - thanks. But: it very quickly hit NULL pointer until I changed that last line to if (first_pgdat) consider_reclaim_throttle(first_pgdat, sc); The likely issue is that huge pages are a major component of the test workload. When this is the case, first_pgdat may never get set if compaction is ready to continue due to this check if (IS_ENABLED(CONFIG_COMPACTION) && sc->order > PAGE_ALLOC_COSTLY_ORDER && compaction_ready(zone, sc)) { sc->compaction_ready = true; continue; } If this was true for every zone in the zonelist, first_pgdat would never get set resulting in a NULL pointer exception. This is a fix to the mmotm patch mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress.patch Link: https://lkml.kernel.org/r/20211209095453.GM3366@xxxxxxxxxxxxxxxxxxx Signed-off-by: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Reported-by: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxxx> Cc: Mike Galbraith <efault@xxxxxx> Cc: Darrick J. Wong <djwong@xxxxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/vmscan.c~mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix +++ a/mm/vmscan.c @@ -3530,7 +3530,8 @@ static void shrink_zones(struct zonelist shrink_node(zone->zone_pgdat, sc); } - consider_reclaim_throttle(first_pgdat, sc); + if (first_pgdat) + consider_reclaim_throttle(first_pgdat, sc); /* * Restore to original mask to avoid the impact on the caller if we _ Patches currently in -mm which might be from mgorman@xxxxxxxxxxxxxxxxxxx are mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress.patch mm-vmscan-reduce-throttling-due-to-a-failure-to-make-progress-fix.patch