diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-07-25 20:12:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:08 -0400 |
commit | 53bb01f593d50188c8d638f89db96f9b6b042bcd (patch) | |
tree | b764d8becd99aee7b337a47fbd71032800831c6d /mm/thrash.c | |
parent | e21c7ffd6f7493aa01bccd17ebc13dbdfecce880 (diff) |
mm: swap-token: makes global variables to function local
global_faults and last_aging are only used in grab_swap_token(). Move
them into grab_swap_token().
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/thrash.c')
-rw-r--r-- | mm/thrash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/thrash.c b/mm/thrash.c index d416d403e140..42ffb0179271 100644 --- a/mm/thrash.c +++ b/mm/thrash.c | |||
@@ -30,8 +30,6 @@ | |||
30 | static DEFINE_SPINLOCK(swap_token_lock); | 30 | static DEFINE_SPINLOCK(swap_token_lock); |
31 | struct mm_struct *swap_token_mm; | 31 | struct mm_struct *swap_token_mm; |
32 | struct mem_cgroup *swap_token_memcg; | 32 | struct mem_cgroup *swap_token_memcg; |
33 | static unsigned int global_faults; | ||
34 | static unsigned int last_aging; | ||
35 | 33 | ||
36 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 34 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
37 | static struct mem_cgroup *swap_token_memcg_from_mm(struct mm_struct *mm) | 35 | static struct mem_cgroup *swap_token_memcg_from_mm(struct mm_struct *mm) |
@@ -55,6 +53,8 @@ void grab_swap_token(struct mm_struct *mm) | |||
55 | { | 53 | { |
56 | int current_interval; | 54 | int current_interval; |
57 | unsigned int old_prio = mm->token_priority; | 55 | unsigned int old_prio = mm->token_priority; |
56 | static unsigned int global_faults; | ||
57 | static unsigned int last_aging; | ||
58 | 58 | ||
59 | global_faults++; | 59 | global_faults++; |
60 | 60 | ||