diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index c94d17d75d73..0e2131deb2d3 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1622,12 +1622,11 @@ static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan, | |||
1622 | return shrink_inactive_list(nr_to_scan, mz, sc, priority, lru); | 1622 | return shrink_inactive_list(nr_to_scan, mz, sc, priority, lru); |
1623 | } | 1623 | } |
1624 | 1624 | ||
1625 | static int vmscan_swappiness(struct mem_cgroup_zone *mz, | 1625 | static int vmscan_swappiness(struct scan_control *sc) |
1626 | struct scan_control *sc) | ||
1627 | { | 1626 | { |
1628 | if (global_reclaim(sc)) | 1627 | if (global_reclaim(sc)) |
1629 | return vm_swappiness; | 1628 | return vm_swappiness; |
1630 | return mem_cgroup_swappiness(mz->mem_cgroup); | 1629 | return mem_cgroup_swappiness(sc->target_mem_cgroup); |
1631 | } | 1630 | } |
1632 | 1631 | ||
1633 | /* | 1632 | /* |
@@ -1695,8 +1694,8 @@ static void get_scan_count(struct mem_cgroup_zone *mz, struct scan_control *sc, | |||
1695 | * With swappiness at 100, anonymous and file have the same priority. | 1694 | * With swappiness at 100, anonymous and file have the same priority. |
1696 | * This scanning priority is essentially the inverse of IO cost. | 1695 | * This scanning priority is essentially the inverse of IO cost. |
1697 | */ | 1696 | */ |
1698 | anon_prio = vmscan_swappiness(mz, sc); | 1697 | anon_prio = vmscan_swappiness(sc); |
1699 | file_prio = 200 - vmscan_swappiness(mz, sc); | 1698 | file_prio = 200 - vmscan_swappiness(sc); |
1700 | 1699 | ||
1701 | /* | 1700 | /* |
1702 | * OK, so we have swap space and a fair amount of page cache | 1701 | * OK, so we have swap space and a fair amount of page cache |
@@ -1741,7 +1740,7 @@ out: | |||
1741 | unsigned long scan; | 1740 | unsigned long scan; |
1742 | 1741 | ||
1743 | scan = zone_nr_lru_pages(mz, lru); | 1742 | scan = zone_nr_lru_pages(mz, lru); |
1744 | if (priority || noswap || !vmscan_swappiness(mz, sc)) { | 1743 | if (priority || noswap || !vmscan_swappiness(sc)) { |
1745 | scan >>= priority; | 1744 | scan >>= priority; |
1746 | if (!scan && force_scan) | 1745 | if (!scan && force_scan) |
1747 | scan = SWAP_CLUSTER_MAX; | 1746 | scan = SWAP_CLUSTER_MAX; |