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, 0 insertions, 8 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b2baca7645d7..5c8a412b43f4 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -63,9 +63,6 @@ struct scan_control {
63 63
64 unsigned long nr_mapped; /* From page_state */ 64 unsigned long nr_mapped; /* From page_state */
65 65
66 /* How many pages shrink_cache() should reclaim */
67 int nr_to_reclaim;
68
69 /* Ask shrink_caches, or shrink_zone to scan at this priority */ 66 /* Ask shrink_caches, or shrink_zone to scan at this priority */
70 unsigned int priority; 67 unsigned int priority;
71 68
@@ -656,7 +653,6 @@ static void shrink_cache(struct zone *zone, struct scan_control *sc)
656 if (current_is_kswapd()) 653 if (current_is_kswapd())
657 mod_page_state(kswapd_steal, nr_freed); 654 mod_page_state(kswapd_steal, nr_freed);
658 mod_page_state_zone(zone, pgsteal, nr_freed); 655 mod_page_state_zone(zone, pgsteal, nr_freed);
659 sc->nr_to_reclaim -= nr_freed;
660 656
661 spin_lock_irq(&zone->lru_lock); 657 spin_lock_irq(&zone->lru_lock);
662 /* 658 /*
@@ -856,8 +852,6 @@ shrink_zone(struct zone *zone, struct scan_control *sc)
856 else 852 else
857 nr_inactive = 0; 853 nr_inactive = 0;
858 854
859 sc->nr_to_reclaim = sc->swap_cluster_max;
860
861 while (nr_active || nr_inactive) { 855 while (nr_active || nr_inactive) {
862 if (nr_active) { 856 if (nr_active) {
863 sc->nr_to_scan = min(nr_active, 857 sc->nr_to_scan = min(nr_active,
@@ -871,8 +865,6 @@ shrink_zone(struct zone *zone, struct scan_control *sc)
871 (unsigned long)sc->swap_cluster_max); 865 (unsigned long)sc->swap_cluster_max);
872 nr_inactive -= sc->nr_to_scan; 866 nr_inactive -= sc->nr_to_scan;
873 shrink_cache(zone, sc); 867 shrink_cache(zone, sc);
874 if (sc->nr_to_reclaim <= 0)
875 break;
876 } 868 }
877 } 869 }
878 870