diff options
author | Shaohua Li <shaohua.li@intel.com> | 2011-10-31 20:08:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:47 -0400 |
commit | 16fb951237c2b0b28037b992ee44e7ee401c30d1 (patch) | |
tree | 756ba52239d304d8f45deb102f17960f0a8517ec /mm/vmscan.c | |
parent | 49ea7eb65e7c5060807fb9312b1ad4c3eab82e2c (diff) |
vmscan: count pages into balanced for zone with good watermark
It's possible a zone watermark is ok when entering the balance_pgdat()
loop, while the zone is within the requested classzone_idx. Count pages
from this zone into `balanced'. In this way, we can skip shrinking zones
too much for high order allocation.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index a297603d35bc..77ee24fc891a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2748,6 +2748,8 @@ out: | |||
2748 | 2748 | ||
2749 | /* If balanced, clear the congested flag */ | 2749 | /* If balanced, clear the congested flag */ |
2750 | zone_clear_flag(zone, ZONE_CONGESTED); | 2750 | zone_clear_flag(zone, ZONE_CONGESTED); |
2751 | if (i <= *classzone_idx) | ||
2752 | balanced += zone->present_pages; | ||
2751 | } | 2753 | } |
2752 | } | 2754 | } |
2753 | 2755 | ||