Skip to content
Snippets Groups Projects
Commit 1dce071e authored by Shaohua Li's avatar Shaohua Li Committed by Linus Torvalds
Browse files

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
No related merge requests found
...@@ -913,7 +913,7 @@ keep_lumpy: ...@@ -913,7 +913,7 @@ keep_lumpy:
* back off and wait for congestion to clear because further reclaim * back off and wait for congestion to clear because further reclaim
* will encounter the same problem * will encounter the same problem
*/ */
if (nr_dirty == nr_congested) if (nr_dirty == nr_congested && nr_dirty != 0)
zone_set_flag(zone, ZONE_CONGESTED); zone_set_flag(zone, ZONE_CONGESTED);
free_page_list(&free_pages); free_page_list(&free_pages);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment