diff options
author | Rik van Riel <riel@redhat.com> | 2012-05-29 18:06:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:19 -0400 |
commit | e709ffd6169ccd259eb5874e853303e91e94e829 (patch) | |
tree | 796b56c2507b8581492da73e354d651c9dd7076b /kernel/fork.c | |
parent | edad9d2c337d43278a9d5aeb0ed531c2e838f8a6 (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 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 47b4e4f379f9..5b13eea2e757 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -614,7 +614,6 @@ void mmput(struct mm_struct *mm) | |||
614 | list_del(&mm->mmlist); | 614 | list_del(&mm->mmlist); |
615 | spin_unlock(&mmlist_lock); | 615 | spin_unlock(&mmlist_lock); |
616 | } | 616 | } |
617 | put_swap_token(mm); | ||
618 | if (mm->binfmt) | 617 | if (mm->binfmt) |
619 | module_put(mm->binfmt->module); | 618 | module_put(mm->binfmt->module); |
620 | mmdrop(mm); | 619 | mmdrop(mm); |
@@ -831,10 +830,6 @@ struct mm_struct *dup_mm(struct task_struct *tsk) | |||
831 | memcpy(mm, oldmm, sizeof(*mm)); | 830 | memcpy(mm, oldmm, sizeof(*mm)); |
832 | mm_init_cpumask(mm); | 831 | mm_init_cpumask(mm); |
833 | 832 | ||
834 | /* Initializing for Swap token stuff */ | ||
835 | mm->token_priority = 0; | ||
836 | mm->last_interval = 0; | ||
837 | |||
838 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 833 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
839 | mm->pmd_huge_pte = NULL; | 834 | mm->pmd_huge_pte = NULL; |
840 | #endif | 835 | #endif |
@@ -913,10 +908,6 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk) | |||
913 | goto fail_nomem; | 908 | goto fail_nomem; |
914 | 909 | ||
915 | good_mm: | 910 | good_mm: |
916 | /* Initializing for Swap token stuff */ | ||
917 | mm->token_priority = 0; | ||
918 | mm->last_interval = 0; | ||
919 | |||
920 | tsk->mm = mm; | 911 | tsk->mm = mm; |
921 | tsk->active_mm = mm; | 912 | tsk->active_mm = mm; |
922 | return 0; | 913 | return 0; |