aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index a68fa20269d9..b7d8015a6d54 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1684,7 +1684,7 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
1684 force_scan = true; 1684 force_scan = true;
1685 1685
1686 /* If we have no swap space, do not bother scanning anon pages. */ 1686 /* If we have no swap space, do not bother scanning anon pages. */
1687 if (!sc->may_swap || (nr_swap_pages <= 0)) { 1687 if (!sc->may_swap || (get_nr_swap_pages() <= 0)) {
1688 scan_balance = SCAN_FILE; 1688 scan_balance = SCAN_FILE;
1689 goto out; 1689 goto out;
1690 } 1690 }
@@ -1933,7 +1933,7 @@ static inline bool should_continue_reclaim(struct zone *zone,
1933 */ 1933 */
1934 pages_for_compaction = (2UL << sc->order); 1934 pages_for_compaction = (2UL << sc->order);
1935 inactive_lru_pages = zone_page_state(zone, NR_INACTIVE_FILE); 1935 inactive_lru_pages = zone_page_state(zone, NR_INACTIVE_FILE);
1936 if (nr_swap_pages > 0) 1936 if (get_nr_swap_pages() > 0)
1937 inactive_lru_pages += zone_page_state(zone, NR_INACTIVE_ANON); 1937 inactive_lru_pages += zone_page_state(zone, NR_INACTIVE_ANON);
1938 if (sc->nr_reclaimed < pages_for_compaction && 1938 if (sc->nr_reclaimed < pages_for_compaction &&
1939 inactive_lru_pages > pages_for_compaction) 1939 inactive_lru_pages > pages_for_compaction)
@@ -3085,7 +3085,7 @@ unsigned long global_reclaimable_pages(void)
3085 nr = global_page_state(NR_ACTIVE_FILE) + 3085 nr = global_page_state(NR_ACTIVE_FILE) +
3086 global_page_state(NR_INACTIVE_FILE); 3086 global_page_state(NR_INACTIVE_FILE);
3087 3087
3088 if (nr_swap_pages > 0) 3088 if (get_nr_swap_pages() > 0)
3089 nr += global_page_state(NR_ACTIVE_ANON) + 3089 nr += global_page_state(NR_ACTIVE_ANON) +
3090 global_page_state(NR_INACTIVE_ANON); 3090 global_page_state(NR_INACTIVE_ANON);
3091 3091
@@ -3099,7 +3099,7 @@ unsigned long zone_reclaimable_pages(struct zone *zone)
3099 nr = zone_page_state(zone, NR_ACTIVE_FILE) + 3099 nr = zone_page_state(zone, NR_ACTIVE_FILE) +
3100 zone_page_state(zone, NR_INACTIVE_FILE); 3100 zone_page_state(zone, NR_INACTIVE_FILE);
3101 3101
3102 if (nr_swap_pages > 0) 3102 if (get_nr_swap_pages() > 0)
3103 nr += zone_page_state(zone, NR_ACTIVE_ANON) + 3103 nr += zone_page_state(zone, NR_ACTIVE_ANON) +
3104 zone_page_state(zone, NR_INACTIVE_ANON); 3104 zone_page_state(zone, NR_INACTIVE_ANON);
3105 3105