It's possible a zone watermark is ok at entering balance_pgdat loop, while the zone is within requested classzone_idx. Countering pages from the zone into balanced. In this way, we can skip shrinking zones too much for high order allocation. Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx> --- mm/vmscan.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux/mm/vmscan.c =================================================================== --- linux.orig/mm/vmscan.c 2011-07-28 15:17:56.000000000 +0800 +++ linux/mm/vmscan.c 2011-07-28 15:34:48.000000000 +0800 @@ -2497,6 +2497,8 @@ loop_again: } else { /* If balanced, clear the congested flag */ zone_clear_flag(zone, ZONE_CONGESTED); + if (i <= *classzone_idx) + balanced += zone->present_pages; } } if (i < 0) -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>