diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 479e46719394..1bca60f0c527 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -60,8 +60,8 @@ struct scan_control { | |||
60 | 60 | ||
61 | int may_writepage; | 61 | int may_writepage; |
62 | 62 | ||
63 | /* Can pages be swapped as part of reclaim? */ | 63 | /* Can mapped pages be reclaimed? */ |
64 | int may_swap; | 64 | int may_unmap; |
65 | 65 | ||
66 | /* This context's SWAP_CLUSTER_MAX. If freeing memory for | 66 | /* This context's SWAP_CLUSTER_MAX. If freeing memory for |
67 | * suspend, we effectively ignore SWAP_CLUSTER_MAX. | 67 | * suspend, we effectively ignore SWAP_CLUSTER_MAX. |
@@ -606,7 +606,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
606 | if (unlikely(!page_evictable(page, NULL))) | 606 | if (unlikely(!page_evictable(page, NULL))) |
607 | goto cull_mlocked; | 607 | goto cull_mlocked; |
608 | 608 | ||
609 | if (!sc->may_swap && page_mapped(page)) | 609 | if (!sc->may_unmap && page_mapped(page)) |
610 | goto keep_locked; | 610 | goto keep_locked; |
611 | 611 | ||
612 | /* Double the slab pressure for mapped and swapcache pages */ | 612 | /* Double the slab pressure for mapped and swapcache pages */ |
@@ -1694,7 +1694,7 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | |||
1694 | .gfp_mask = gfp_mask, | 1694 | .gfp_mask = gfp_mask, |
1695 | .may_writepage = !laptop_mode, | 1695 | .may_writepage = !laptop_mode, |
1696 | .swap_cluster_max = SWAP_CLUSTER_MAX, | 1696 | .swap_cluster_max = SWAP_CLUSTER_MAX, |
1697 | .may_swap = 1, | 1697 | .may_unmap = 1, |
1698 | .swappiness = vm_swappiness, | 1698 | .swappiness = vm_swappiness, |
1699 | .order = order, | 1699 | .order = order, |
1700 | .mem_cgroup = NULL, | 1700 | .mem_cgroup = NULL, |
@@ -1713,7 +1713,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont, | |||
1713 | { | 1713 | { |
1714 | struct scan_control sc = { | 1714 | struct scan_control sc = { |
1715 | .may_writepage = !laptop_mode, | 1715 | .may_writepage = !laptop_mode, |
1716 | .may_swap = 1, | 1716 | .may_unmap = 1, |
1717 | .swap_cluster_max = SWAP_CLUSTER_MAX, | 1717 | .swap_cluster_max = SWAP_CLUSTER_MAX, |
1718 | .swappiness = swappiness, | 1718 | .swappiness = swappiness, |
1719 | .order = 0, | 1719 | .order = 0, |
@@ -1723,7 +1723,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont, | |||
1723 | struct zonelist *zonelist; | 1723 | struct zonelist *zonelist; |
1724 | 1724 | ||
1725 | if (noswap) | 1725 | if (noswap) |
1726 | sc.may_swap = 0; | 1726 | sc.may_unmap = 0; |
1727 | 1727 | ||
1728 | sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) | | 1728 | sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) | |
1729 | (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK); | 1729 | (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK); |
@@ -1762,7 +1762,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order) | |||
1762 | struct reclaim_state *reclaim_state = current->reclaim_state; | 1762 | struct reclaim_state *reclaim_state = current->reclaim_state; |
1763 | struct scan_control sc = { | 1763 | struct scan_control sc = { |
1764 | .gfp_mask = GFP_KERNEL, | 1764 | .gfp_mask = GFP_KERNEL, |
1765 | .may_swap = 1, | 1765 | .may_unmap = 1, |
1766 | .swap_cluster_max = SWAP_CLUSTER_MAX, | 1766 | .swap_cluster_max = SWAP_CLUSTER_MAX, |
1767 | .swappiness = vm_swappiness, | 1767 | .swappiness = vm_swappiness, |
1768 | .order = order, | 1768 | .order = order, |
@@ -2110,7 +2110,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages) | |||
2110 | struct reclaim_state reclaim_state; | 2110 | struct reclaim_state reclaim_state; |
2111 | struct scan_control sc = { | 2111 | struct scan_control sc = { |
2112 | .gfp_mask = GFP_KERNEL, | 2112 | .gfp_mask = GFP_KERNEL, |
2113 | .may_swap = 0, | 2113 | .may_unmap = 0, |
2114 | .swap_cluster_max = nr_pages, | 2114 | .swap_cluster_max = nr_pages, |
2115 | .may_writepage = 1, | 2115 | .may_writepage = 1, |
2116 | .isolate_pages = isolate_pages_global, | 2116 | .isolate_pages = isolate_pages_global, |
@@ -2147,7 +2147,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages) | |||
2147 | 2147 | ||
2148 | /* Force reclaiming mapped pages in the passes #3 and #4 */ | 2148 | /* Force reclaiming mapped pages in the passes #3 and #4 */ |
2149 | if (pass > 2) | 2149 | if (pass > 2) |
2150 | sc.may_swap = 1; | 2150 | sc.may_unmap = 1; |
2151 | 2151 | ||
2152 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { | 2152 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { |
2153 | unsigned long nr_to_scan = nr_pages - ret; | 2153 | unsigned long nr_to_scan = nr_pages - ret; |
@@ -2290,7 +2290,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) | |||
2290 | int priority; | 2290 | int priority; |
2291 | struct scan_control sc = { | 2291 | struct scan_control sc = { |
2292 | .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), | 2292 | .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), |
2293 | .may_swap = !!(zone_reclaim_mode & RECLAIM_SWAP), | 2293 | .may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP), |
2294 | .swap_cluster_max = max_t(unsigned long, nr_pages, | 2294 | .swap_cluster_max = max_t(unsigned long, nr_pages, |
2295 | SWAP_CLUSTER_MAX), | 2295 | SWAP_CLUSTER_MAX), |
2296 | .gfp_mask = gfp_mask, | 2296 | .gfp_mask = gfp_mask, |