Skip to content

Commit 16fb951

Browse files
Shaohua Litorvalds
authored andcommitted
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>
1 parent 49ea7eb commit 16fb951

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎mm/vmscan.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,6 +2748,8 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
27482748

27492749
/* If balanced, clear the congested flag */
27502750
zone_clear_flag(zone, ZONE_CONGESTED);
2751+
if (i <= *classzone_idx)
2752+
balanced += zone->present_pages;
27512753
}
27522754
}
27532755

0 commit comments

Comments
 (0)