mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
edad9d2c33
commit
e709ffd616
10 changed files with 2 additions and 307 deletions
|
@ -614,7 +614,6 @@ void mmput(struct mm_struct *mm)
|
|||
list_del(&mm->mmlist);
|
||||
spin_unlock(&mmlist_lock);
|
||||
}
|
||||
put_swap_token(mm);
|
||||
if (mm->binfmt)
|
||||
module_put(mm->binfmt->module);
|
||||
mmdrop(mm);
|
||||
|
@ -831,10 +830,6 @@ struct mm_struct *dup_mm(struct task_struct *tsk)
|
|||
memcpy(mm, oldmm, sizeof(*mm));
|
||||
mm_init_cpumask(mm);
|
||||
|
||||
/* Initializing for Swap token stuff */
|
||||
mm->token_priority = 0;
|
||||
mm->last_interval = 0;
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
mm->pmd_huge_pte = NULL;
|
||||
#endif
|
||||
|
@ -913,10 +908,6 @@ static int copy_mm(unsigned long clone_flags, struct task_struct *tsk)
|
|||
goto fail_nomem;
|
||||
|
||||
good_mm:
|
||||
/* Initializing for Swap token stuff */
|
||||
mm->token_priority = 0;
|
||||
mm->last_interval = 0;
|
||||
|
||||
tsk->mm = mm;
|
||||
tsk->active_mm = mm;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue