diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2010-03-05 16:41:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:26:23 -0500 |
commit | d559db086ff5be9bcc259e5aa50bf3d881eaf1d1 (patch) | |
tree | aa968c8a4093234e4623a34c0415bf9d8683671c /mm/swapfile.c | |
parent | 19b629f581320999ddb9f6597051b79cdb53459c (diff) |
mm: clean up mm_counter
Presently, per-mm statistics counter is defined by macro in sched.h
This patch modifies it to
- defined in mm.h as inlinf functions
- use array instead of macro's name creation.
This patch is for reducing patch size in future patch to modify
implementation of per-mm counter.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 6c0585b16418..893984946a2c 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -840,7 +840,7 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd, | |||
840 | goto out; | 840 | goto out; |
841 | } | 841 | } |
842 | 842 | ||
843 | inc_mm_counter(vma->vm_mm, anon_rss); | 843 | inc_mm_counter(vma->vm_mm, MM_ANONPAGES); |
844 | get_page(page); | 844 | get_page(page); |
845 | set_pte_at(vma->vm_mm, addr, pte, | 845 | set_pte_at(vma->vm_mm, addr, pte, |
846 | pte_mkold(mk_pte(page, vma->vm_page_prot))); | 846 | pte_mkold(mk_pte(page, vma->vm_page_prot))); |