diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index f350523a8eee..d500b906746c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1327,12 +1327,6 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc, | |||
1327 | unsigned long anon_prio, file_prio; | 1327 | unsigned long anon_prio, file_prio; |
1328 | unsigned long ap, fp; | 1328 | unsigned long ap, fp; |
1329 | 1329 | ||
1330 | anon = zone_page_state(zone, NR_ACTIVE_ANON) + | ||
1331 | zone_page_state(zone, NR_INACTIVE_ANON); | ||
1332 | file = zone_page_state(zone, NR_ACTIVE_FILE) + | ||
1333 | zone_page_state(zone, NR_INACTIVE_FILE); | ||
1334 | free = zone_page_state(zone, NR_FREE_PAGES); | ||
1335 | |||
1336 | /* If we have no swap space, do not bother scanning anon pages. */ | 1330 | /* If we have no swap space, do not bother scanning anon pages. */ |
1337 | if (nr_swap_pages <= 0) { | 1331 | if (nr_swap_pages <= 0) { |
1338 | percent[0] = 0; | 1332 | percent[0] = 0; |
@@ -1340,6 +1334,12 @@ static void get_scan_ratio(struct zone *zone, struct scan_control *sc, | |||
1340 | return; | 1334 | return; |
1341 | } | 1335 | } |
1342 | 1336 | ||
1337 | anon = zone_page_state(zone, NR_ACTIVE_ANON) + | ||
1338 | zone_page_state(zone, NR_INACTIVE_ANON); | ||
1339 | file = zone_page_state(zone, NR_ACTIVE_FILE) + | ||
1340 | zone_page_state(zone, NR_INACTIVE_FILE); | ||
1341 | free = zone_page_state(zone, NR_FREE_PAGES); | ||
1342 | |||
1343 | /* If we have very few page cache pages, force-scan anon pages. */ | 1343 | /* If we have very few page cache pages, force-scan anon pages. */ |
1344 | if (unlikely(file + free <= zone->pages_high)) { | 1344 | if (unlikely(file + free <= zone->pages_high)) { |
1345 | percent[0] = 100; | 1345 | percent[0] = 100; |