aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2012-05-29 18:06:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 19:22:19 -0400
commite709ffd6169ccd259eb5874e853303e91e94e829 (patch)
tree796b56c2507b8581492da73e354d651c9dd7076b /mm/vmscan.c
parentedad9d2c337d43278a9d5aeb0ed531c2e838f8a6 (diff)
mm: remove swap token code
The swap token code no longer fits in with the current VM model. It does not play well with cgroups or the better NUMA placement code in development, since we have only one swap token globally. It also has the potential to mess with scalability of the system, by increasing the number of non-reclaimable pages on the active and inactive anon LRU lists. Last but not least, the swap token code has been broken for a year without complaints, as reported by Konstantin Khlebnikov. This suggests we no longer have much use for it. The days of sub-1G memory systems with heavy use of swap are over. If we ever need thrashing reducing code in the future, we will have to implement something that does scale. Signed-off-by: Rik van Riel <riel@redhat.com> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Acked-by: Bob Picco <bpicco@meloft.net> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 33dc256033b..ca46080bb07 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2352,8 +2352,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
2352 2352
2353 for (priority = DEF_PRIORITY; priority >= 0; priority--) { 2353 for (priority = DEF_PRIORITY; priority >= 0; priority--) {
2354 sc->nr_scanned = 0; 2354 sc->nr_scanned = 0;
2355 if (!priority)
2356 disable_swap_token(sc->target_mem_cgroup);
2357 aborted_reclaim = shrink_zones(priority, zonelist, sc); 2355 aborted_reclaim = shrink_zones(priority, zonelist, sc);
2358 2356
2359 /* 2357 /*
@@ -2704,10 +2702,6 @@ loop_again:
2704 unsigned long lru_pages = 0; 2702 unsigned long lru_pages = 0;
2705 int has_under_min_watermark_zone = 0; 2703 int has_under_min_watermark_zone = 0;
2706 2704
2707 /* The swap token gets in the way of swapout... */
2708 if (!priority)
2709 disable_swap_token(NULL);
2710
2711 all_zones_ok = 1; 2705 all_zones_ok = 1;
2712 balanced = 0; 2706 balanced = 0;
2713 2707