aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmscan.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6827d35954fb..e2b31a522a66 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1376,13 +1376,16 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc,
1376 zone_nr_pages(zone, sc, LRU_INACTIVE_ANON); 1376 zone_nr_pages(zone, sc, LRU_INACTIVE_ANON);
1377 file = zone_nr_pages(zone, sc, LRU_ACTIVE_FILE) + 1377 file = zone_nr_pages(zone, sc, LRU_ACTIVE_FILE) +
1378 zone_nr_pages(zone, sc, LRU_INACTIVE_FILE); 1378 zone_nr_pages(zone, sc, LRU_INACTIVE_FILE);
1379 free = zone_page_state(zone, NR_FREE_PAGES);
1380 1379
1381 /* If we have very few page cache pages, force-scan anon pages. */ 1380 if (scan_global_lru(sc)) {
1382 if (unlikely(file + free <= zone->pages_high)) { 1381 free = zone_page_state(zone, NR_FREE_PAGES);
1383 percent[0] = 100; 1382 /* If we have very few page cache pages,
1384 percent[1] = 0; 1383 force-scan anon pages. */
1385 return; 1384 if (unlikely(file + free <= zone->pages_high)) {
1385 percent[0] = 100;
1386 percent[1] = 0;
1387 return;
1388 }
1386 } 1389 }
1387 1390
1388 /* 1391 /*