diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-03-04 17:29:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 19:35:14 -0500 |
commit | bd845e38c7a7251a95a8f2c38aa7fb87140b771d (patch) | |
tree | 007a1a6703f4fe27d52a07e6caea8ce87d06ff77 | |
parent | acc4988bcf38f9618886eaeb9802aeacc6978ec2 (diff) |
memcg: mm_match_cgroup not vm_match_cgroup
vm_match_cgroup is a perverse name for a macro to match mm with cgroup: rename
it mm_match_cgroup, matching mm_init_cgroup and mm_free_cgroup.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hirokazu Takahashi <taka@valinux.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/memcontrol.h | 4 | ||||
-rw-r--r-- | mm/memcontrol.c | 2 | ||||
-rw-r--r-- | mm/rmap.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index a8be8073b9e6..e4247c83c1c7 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -48,7 +48,7 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | |||
48 | gfp_t gfp_mask); | 48 | gfp_t gfp_mask); |
49 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); | 49 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem); |
50 | 50 | ||
51 | #define vm_match_cgroup(mm, cgroup) \ | 51 | #define mm_match_cgroup(mm, cgroup) \ |
52 | ((cgroup) == rcu_dereference((mm)->mem_cgroup)) | 52 | ((cgroup) == rcu_dereference((mm)->mem_cgroup)) |
53 | 53 | ||
54 | extern int mem_cgroup_prepare_migration(struct page *page); | 54 | extern int mem_cgroup_prepare_migration(struct page *page); |
@@ -118,7 +118,7 @@ static inline int mem_cgroup_cache_charge(struct page *page, | |||
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
120 | 120 | ||
121 | static inline int vm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) | 121 | static inline int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) |
122 | { | 122 | { |
123 | return 1; | 123 | return 1; |
124 | } | 124 | } |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 631002d085d1..41041c0a6898 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -399,7 +399,7 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) | |||
399 | int ret; | 399 | int ret; |
400 | 400 | ||
401 | task_lock(task); | 401 | task_lock(task); |
402 | ret = task->mm && vm_match_cgroup(task->mm, mem); | 402 | ret = task->mm && mm_match_cgroup(task->mm, mem); |
403 | task_unlock(task); | 403 | task_unlock(task); |
404 | return ret; | 404 | return ret; |
405 | } | 405 | } |
@@ -321,7 +321,7 @@ static int page_referenced_anon(struct page *page, | |||
321 | * counting on behalf of references from different | 321 | * counting on behalf of references from different |
322 | * cgroups | 322 | * cgroups |
323 | */ | 323 | */ |
324 | if (mem_cont && !vm_match_cgroup(vma->vm_mm, mem_cont)) | 324 | if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) |
325 | continue; | 325 | continue; |
326 | referenced += page_referenced_one(page, vma, &mapcount); | 326 | referenced += page_referenced_one(page, vma, &mapcount); |
327 | if (!mapcount) | 327 | if (!mapcount) |
@@ -382,7 +382,7 @@ static int page_referenced_file(struct page *page, | |||
382 | * counting on behalf of references from different | 382 | * counting on behalf of references from different |
383 | * cgroups | 383 | * cgroups |
384 | */ | 384 | */ |
385 | if (mem_cont && !vm_match_cgroup(vma->vm_mm, mem_cont)) | 385 | if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) |
386 | continue; | 386 | continue; |
387 | if ((vma->vm_flags & (VM_LOCKED|VM_MAYSHARE)) | 387 | if ((vma->vm_flags & (VM_LOCKED|VM_MAYSHARE)) |
388 | == (VM_LOCKED|VM_MAYSHARE)) { | 388 | == (VM_LOCKED|VM_MAYSHARE)) { |