]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
It's possible a zone watermark is ok when entering the balance_pgdat()
authorShaohua Li <shaohua.li@intel.com>
Wed, 24 Aug 2011 23:47:04 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 Sep 2011 08:26:23 +0000 (18:26 +1000)
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>
mm/vmscan.c

index 5bc9eff60d188d929a2cff25e399abef856be609..21a7e49126abdfed43e64a6ac72132d36a9f54f6 100644 (file)
@@ -2732,6 +2732,8 @@ out:
 
                        /* If balanced, clear the congested flag */
                        zone_clear_flag(zone, ZONE_CONGESTED);
+                       if (i <= *classzone_idx)
+                               balanced += zone->present_pages;
                }
        }