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 b32560ead5c0..518540a4a2a6 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -760,7 +760,7 @@ static inline int zone_is_near_oom(struct zone *zone) | |||
760 | * But we had to alter page->flags anyway. | 760 | * But we had to alter page->flags anyway. |
761 | */ | 761 | */ |
762 | static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | 762 | static void shrink_active_list(unsigned long nr_pages, struct zone *zone, |
763 | struct scan_control *sc) | 763 | struct scan_control *sc, int priority) |
764 | { | 764 | { |
765 | unsigned long pgmoved; | 765 | unsigned long pgmoved; |
766 | int pgdeactivate = 0; | 766 | int pgdeactivate = 0; |
@@ -784,7 +784,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
784 | * `distress' is a measure of how much trouble we're having | 784 | * `distress' is a measure of how much trouble we're having |
785 | * reclaiming pages. 0 -> no problems. 100 -> great trouble. | 785 | * reclaiming pages. 0 -> no problems. 100 -> great trouble. |
786 | */ | 786 | */ |
787 | distress = 100 >> zone->prev_priority; | 787 | distress = 100 >> min(zone->prev_priority, priority); |
788 | 788 | ||
789 | /* | 789 | /* |
790 | * The point of this algorithm is to decide when to start | 790 | * The point of this algorithm is to decide when to start |
@@ -936,7 +936,7 @@ static unsigned long shrink_zone(int priority, struct zone *zone, | |||
936 | nr_to_scan = min(nr_active, | 936 | nr_to_scan = min(nr_active, |
937 | (unsigned long)sc->swap_cluster_max); | 937 | (unsigned long)sc->swap_cluster_max); |
938 | nr_active -= nr_to_scan; | 938 | nr_active -= nr_to_scan; |
939 | shrink_active_list(nr_to_scan, zone, sc); | 939 | shrink_active_list(nr_to_scan, zone, sc, priority); |
940 | } | 940 | } |
941 | 941 | ||
942 | if (nr_inactive) { | 942 | if (nr_inactive) { |
@@ -1384,7 +1384,7 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int pass, | |||
1384 | if (zone->nr_scan_active >= nr_pages || pass > 3) { | 1384 | if (zone->nr_scan_active >= nr_pages || pass > 3) { |
1385 | zone->nr_scan_active = 0; | 1385 | zone->nr_scan_active = 0; |
1386 | nr_to_scan = min(nr_pages, zone->nr_active); | 1386 | nr_to_scan = min(nr_pages, zone->nr_active); |
1387 | shrink_active_list(nr_to_scan, zone, sc); | 1387 | shrink_active_list(nr_to_scan, zone, sc, prio); |
1388 | } | 1388 | } |
1389 | } | 1389 | } |
1390 | 1390 | ||