lkml.org 
[lkml]   [2008]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 09/21] (NEW) improve reclaim balancing
- deactivate anonymous pages regardless of the scan ratio
- go through the reclaim loop at least once for the deactivation
- break out of the reclaim loop if we freed sc->swap_cluster_max pages,
on big systems the nr[FOO] targets can get ridiculously large

Signed-off-by: Rik van Riel <riel@redhat.com>

Index: linux-2.6.25-rc2-mm1/mm/vmscan.c
===================================================================
--- linux-2.6.25-rc2-mm1.orig/mm/vmscan.c 2008-02-28 00:29:40.000000000 -0500
+++ linux-2.6.25-rc2-mm1/mm/vmscan.c 2008-02-28 00:29:46.000000000 -0500
@@ -1302,7 +1302,7 @@ static unsigned long shrink_zone(int pri
}

while (nr[LRU_INACTIVE_ANON] || nr[LRU_ACTIVE_FILE] ||
- nr[LRU_INACTIVE_FILE]) {
+ nr[LRU_INACTIVE_FILE]) {
for_each_lru(l) {
if (nr[l]) {
nr_to_scan = min(nr[l],
@@ -1315,6 +1315,14 @@ static unsigned long shrink_zone(int pri
}
}

+ /*
+ * Even if we did not try to evict anon pages at all, we want to
+ * rebalance the anon lru active/inactive ratio.
+ */
+ if (inactive_anon_low(zone))
+ shrink_list(NR_ACTIVE_ANON, SWAP_CLUSTER_MAX, zone, sc,
+ priority);
+
throttle_vm_writeout(sc->gfp_mask);
return nr_reclaimed;
}
--
All Rights Reversed



\
 
 \ /
  Last update: 2008-02-28 20:47    [W:0.255 / U:2.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site