Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: vmscan: fix inappropriate zone congestion clearing

commit c702418f8a2f ("mm: vmscan: do not keep kswapd looping forever due
to individual uncompactable zones") removed zone watermark checks from
the compaction code in kswapd but left in the zone congestion clearing,
which now happens unconditionally on higher order reclaim.

This messes up the reclaim throttling logic for zones with
dirty/writeback pages, where zones should only lose their congestion
status when their watermarks have been restored.

Remove the clearing from the zone compaction section entirely. The
preliminary zone check and the reclaim loop in kswapd will clear it if
the zone is considered balanced.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Johannes Weiner and committed by
Linus Torvalds
ed23ec4f 684c9aae

-3
-3
mm/vmscan.c
··· 2827 2827 if (zone_watermark_ok(zone, order, 2828 2828 low_wmark_pages(zone), *classzone_idx, 0)) 2829 2829 zones_need_compaction = 0; 2830 - 2831 - /* If balanced, clear the congested flag */ 2832 - zone_clear_flag(zone, ZONE_CONGESTED); 2833 2830 } 2834 2831 2835 2832 if (zones_need_compaction)