diff options
author | Shaohua Li <shaohua.li@intel.com> | 2010-11-11 17:05:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 10:55:31 -0500 |
commit | 1dce071e18b7264457d17c0dec4c7e430bfaee7d (patch) | |
tree | ced52f7f8e4177f9ea37f891f4d33d0a5109e651 /mm | |
parent | 38715258aa2e8cd94bd4aafadc544e5104efd551 (diff) |
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 <shaohua.li@intel.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index b8a6fdc21312..d31d7ce52c0e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -913,7 +913,7 @@ keep_lumpy: | |||
913 | * back off and wait for congestion to clear because further reclaim | 913 | * back off and wait for congestion to clear because further reclaim |
914 | * will encounter the same problem | 914 | * will encounter the same problem |
915 | */ | 915 | */ |
916 | if (nr_dirty == nr_congested) | 916 | if (nr_dirty == nr_congested && nr_dirty != 0) |
917 | zone_set_flag(zone, ZONE_CONGESTED); | 917 | zone_set_flag(zone, ZONE_CONGESTED); |
918 | 918 | ||
919 | free_page_list(&free_pages); | 919 | free_page_list(&free_pages); |