1 Swappiness the tunable lies. It doesn't respect swappiness because it alters
2 the value when we're more than lightly loaded in the vm. Change it to -really-
3 mean swappiness unless we're about to go out of memory.
7 mm/vmscan.c | 7 ++++++-
8 1 file changed, 6 insertions(+), 1 deletion(-)
10 Index: linux-2.6.34-ck1/mm/vmscan.c
11 ===================================================================
12 --- linux-2.6.34-ck1.orig/mm/vmscan.c 2010-05-18 12:24:33.974319780 +1000
13 +++ linux-2.6.34-ck1/mm/vmscan.c 2010-05-18 12:26:16.233444880 +1000
14 @@ -1633,6 +1633,7 @@ static void shrink_zone(int priority, st
15 unsigned long nr_reclaimed = 0;
16 unsigned long percent[2]; /* anon @ 0; file @ 1 */
20 get_scan_ratio(zone, sc, percent);
22 @@ -1648,7 +1649,11 @@ static void shrink_zone(int priority, st
24 scan = zone_page_state(zone, NR_LRU_BASE + l);
27 + tmp_priority = priority;
29 + if (file && priority > 0)
30 + tmp_priority = DEF_PRIORITY;
31 + scan >>= tmp_priority;
32 scan = (scan * percent[file]) / 100;
34 zone->lru[l].nr_scan += scan;