Commit 1dce071e authored by Shaohua Li's avatar Shaohua Li Committed by Linus Torvalds

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: default avatarShaohua Li <shaohua.li@intel.com>
Reviewed-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarMinchan Kim <minchan.kim@gmail.com>
Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 38715258
......@@ -913,7 +913,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
* 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment