The patch titled Subject: mm, vmscan: clear PGDAT_WRITEBACK when zone is balanced has been added to the -mm tree. Its filename is mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced.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/SubmitChecklist 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@xxxxxxx> Subject: mm, vmscan: clear PGDAT_WRITEBACK when zone is balanced Hillf Danton pointed out that since commit 1d82de618dd ("mm, vmscan: make kswapd reclaim in terms of nodes") that PGDAT_WRITEBACK is no longer cleared. It was not noticed as triggering it requires pages under writeback to cycle twice through the LRU and before kswapd gets stalled. Historically, such issues tended to occur on small machines writing heavily to slow storage such as a USB stick. Once kswapd stalls, direct reclaim stalls may be higher but due to the fact that memory pressure is required, it would not be very noticable. Michal Hocko suggested removing the flag entirely but the conservative fix is to restore the intended PGDAT_WRITEBACK behaviour and clear the flag when a suitable zone is balanced. Link: http://lkml.kernel.org/r/20170203203222.gq7hk66yc36lpgtb@xxxxxxx Signed-off-by: Mel Gorman <mgorman@xxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Hillf Danton <hillf.zj@xxxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmscan.c | 1 + 1 file changed, 1 insertion(+) diff -puN mm/vmscan.c~mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced mm/vmscan.c --- a/mm/vmscan.c~mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced +++ a/mm/vmscan.c @@ -3103,6 +3103,7 @@ static bool zone_balanced(struct zone *z */ clear_bit(PGDAT_CONGESTED, &zone->zone_pgdat->flags); clear_bit(PGDAT_DIRTY, &zone->zone_pgdat->flags); + clear_bit(PGDAT_WRITEBACK, &zone->zone_pgdat->flags); return true; } _ Patches currently in -mm which might be from mgorman@xxxxxxx are mm-vmscan-clear-pgdat_writeback-when-zone-is-balanced.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html