From 47e5f2340624f7f7a2bca7631ca72d8fed9b3686 Mon Sep 17 00:00:00 2001 From: Martin Bligh Date: Sat, 28 Oct 2006 10:38:25 -0700 Subject: [PATCH] --- yaml --- r: 40386 b: refs/heads/master c: bbdb396a60b2ebf7de3b717991e5d3e28c8b7bbd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/vmscan.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3efcb92f88fd..1ed558d2abf7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3bb1a852ab6c9cdf211a2f4a2f502340c8c38eca +refs/heads/master: bbdb396a60b2ebf7de3b717991e5d3e28c8b7bbd diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index b32560ead5c0..518540a4a2a6 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -760,7 +760,7 @@ static inline int zone_is_near_oom(struct zone *zone) * But we had to alter page->flags anyway. */ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, - struct scan_control *sc) + struct scan_control *sc, int priority) { unsigned long pgmoved; int pgdeactivate = 0; @@ -784,7 +784,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, * `distress' is a measure of how much trouble we're having * reclaiming pages. 0 -> no problems. 100 -> great trouble. */ - distress = 100 >> zone->prev_priority; + distress = 100 >> min(zone->prev_priority, priority); /* * 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, nr_to_scan = min(nr_active, (unsigned long)sc->swap_cluster_max); nr_active -= nr_to_scan; - shrink_active_list(nr_to_scan, zone, sc); + shrink_active_list(nr_to_scan, zone, sc, priority); } if (nr_inactive) { @@ -1384,7 +1384,7 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int pass, if (zone->nr_scan_active >= nr_pages || pass > 3) { zone->nr_scan_active = 0; nr_to_scan = min(nr_pages, zone->nr_active); - shrink_active_list(nr_to_scan, zone, sc); + shrink_active_list(nr_to_scan, zone, sc, prio); } }