Skip to content

Commit

Permalink
vmscan: count pages into balanced for zone with good watermark
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaohua Li authored and Linus Torvalds committed Nov 1, 2011
1 parent 49ea7eb commit 16fb951
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,8 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,

/* If balanced, clear the congested flag */
zone_clear_flag(zone, ZONE_CONGESTED);
if (i <= *classzone_idx)
balanced += zone->present_pages;
}
}

Expand Down

0 comments on commit 16fb951

Please sign in to comment.