diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index eeacb0d695c3..d2caf7471cf1 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -990,7 +990,7 @@ unsigned long try_to_free_pages(struct zone **zones, gfp_t gfp_mask) | |||
990 | } | 990 | } |
991 | 991 | ||
992 | for (priority = DEF_PRIORITY; priority >= 0; priority--) { | 992 | for (priority = DEF_PRIORITY; priority >= 0; priority--) { |
993 | sc.nr_mapped = read_page_state(nr_mapped); | 993 | sc.nr_mapped = global_page_state(NR_FILE_MAPPED); |
994 | sc.nr_scanned = 0; | 994 | sc.nr_scanned = 0; |
995 | if (!priority) | 995 | if (!priority) |
996 | disable_swap_token(); | 996 | disable_swap_token(); |
@@ -1075,7 +1075,7 @@ loop_again: | |||
1075 | total_scanned = 0; | 1075 | total_scanned = 0; |
1076 | nr_reclaimed = 0; | 1076 | nr_reclaimed = 0; |
1077 | sc.may_writepage = !laptop_mode; | 1077 | sc.may_writepage = !laptop_mode; |
1078 | sc.nr_mapped = read_page_state(nr_mapped); | 1078 | sc.nr_mapped = global_page_state(NR_FILE_MAPPED); |
1079 | 1079 | ||
1080 | inc_page_state(pageoutrun); | 1080 | inc_page_state(pageoutrun); |
1081 | 1081 | ||
@@ -1407,7 +1407,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages) | |||
1407 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { | 1407 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { |
1408 | unsigned long nr_to_scan = nr_pages - ret; | 1408 | unsigned long nr_to_scan = nr_pages - ret; |
1409 | 1409 | ||
1410 | sc.nr_mapped = read_page_state(nr_mapped); | 1410 | sc.nr_mapped = global_page_state(NR_FILE_MAPPED); |
1411 | sc.nr_scanned = 0; | 1411 | sc.nr_scanned = 0; |
1412 | 1412 | ||
1413 | ret += shrink_all_zones(nr_to_scan, prio, pass, &sc); | 1413 | ret += shrink_all_zones(nr_to_scan, prio, pass, &sc); |
@@ -1548,7 +1548,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) | |||
1548 | struct scan_control sc = { | 1548 | struct scan_control sc = { |
1549 | .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), | 1549 | .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), |
1550 | .may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP), | 1550 | .may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP), |
1551 | .nr_mapped = read_page_state(nr_mapped), | 1551 | .nr_mapped = global_page_state(NR_FILE_MAPPED), |
1552 | .swap_cluster_max = max_t(unsigned long, nr_pages, | 1552 | .swap_cluster_max = max_t(unsigned long, nr_pages, |
1553 | SWAP_CLUSTER_MAX), | 1553 | SWAP_CLUSTER_MAX), |
1554 | .gfp_mask = gfp_mask, | 1554 | .gfp_mask = gfp_mask, |