aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-09-17 17:07:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-09-17 17:07:46 -0400
commitad501d18302427a48fee3502d03cfa385d0adf9b (patch)
tree6cb9fa20c8dc7acc8741375c42edbe0c0b0407b9 /mm
parent46186fd78b95d2a02232485597ec03771527710d (diff)
parent21094cfa0c0cc2ebbef5f5cdb04dbf7675aafb0e (diff)
Merge tag 'v3.2.29' into v3.2-rt
This is the 3.2.29 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2a29cf8b733b..ee4f086e3d05 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1977,10 +1977,10 @@ static void get_scan_count(struct zone *zone, struct scan_control *sc,
* proportional to the fraction of recently scanned pages on
* each list that were recently referenced and in active use.
*/
- ap = (anon_prio + 1) * (reclaim_stat->recent_scanned[0] + 1);
+ ap = anon_prio * (reclaim_stat->recent_scanned[0] + 1);
ap /= reclaim_stat->recent_rotated[0] + 1;
- fp = (file_prio + 1) * (reclaim_stat->recent_scanned[1] + 1);
+ fp = file_prio * (reclaim_stat->recent_scanned[1] + 1);
fp /= reclaim_stat->recent_rotated[1] + 1;
spin_unlock_irq(&zone->lru_lock);
@@ -1993,7 +1993,7 @@ out:
unsigned long scan;
scan = zone_nr_lru_pages(zone, sc, l);
- if (priority || noswap) {
+ if (priority || noswap || !vmscan_swappiness(sc)) {
scan >>= priority;
if (!scan && force_scan)
scan = SWAP_CLUSTER_MAX;