From: Shaohua Li Date: Thu, 11 Nov 2010 22:05:17 +0000 (-0800) Subject: vmscan: avoid setting zone congested if no page dirty X-Git-Tag: v2.6.37-rc2~57 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1dce071e18b7264457d17c0dec4c7e430bfaee7d;p=~emulex%2Finfiniband.git vmscan: avoid setting zone congested if no page dirty nr_dirty and nr_congested are increased only when the page is dirty. So if all pages are clean, both them will be zero. In this case, we should not mark the zone congested. Signed-off-by: Shaohua Li Reviewed-by: Johannes Weiner Reviewed-by: Minchan Kim Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index b8a6fdc2131..d31d7ce52c0 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -913,7 +913,7 @@ keep_lumpy: * back off and wait for congestion to clear because further reclaim * will encounter the same problem */ - if (nr_dirty == nr_congested) + if (nr_dirty == nr_congested && nr_dirty != 0) zone_set_flag(zone, ZONE_CONGESTED); free_page_list(&free_pages);