diff options
author | Michal Hocko <mhocko@suse.cz> | 2014-04-07 18:37:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:57 -0400 |
commit | d715ae08f2ff87508a081c4df78061bf4f7211d6 (patch) | |
tree | d81db4fd7c18cd7c549ab638ebeff1d07437d9a5 /mm/memory.c | |
parent | 6d1fdc48938cd51a3964778d78f27cb26c8eb55d (diff) |
memcg: rename high level charging functions
mem_cgroup_newpage_charge is used only for charging anonymous memory so
it is better to rename it to mem_cgroup_charge_anon.
mem_cgroup_cache_charge is used for file backed memory so rename it to
mem_cgroup_charge_file.
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index 1b88da5c08b3..854e4027719f 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2828,7 +2828,7 @@ gotten: | |||
2828 | } | 2828 | } |
2829 | __SetPageUptodate(new_page); | 2829 | __SetPageUptodate(new_page); |
2830 | 2830 | ||
2831 | if (mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL)) | 2831 | if (mem_cgroup_charge_anon(new_page, mm, GFP_KERNEL)) |
2832 | goto oom_free_new; | 2832 | goto oom_free_new; |
2833 | 2833 | ||
2834 | mmun_start = address & PAGE_MASK; | 2834 | mmun_start = address & PAGE_MASK; |
@@ -3281,7 +3281,7 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3281 | */ | 3281 | */ |
3282 | __SetPageUptodate(page); | 3282 | __SetPageUptodate(page); |
3283 | 3283 | ||
3284 | if (mem_cgroup_newpage_charge(page, mm, GFP_KERNEL)) | 3284 | if (mem_cgroup_charge_anon(page, mm, GFP_KERNEL)) |
3285 | goto oom_free_page; | 3285 | goto oom_free_page; |
3286 | 3286 | ||
3287 | entry = mk_pte(page, vma->vm_page_prot); | 3287 | entry = mk_pte(page, vma->vm_page_prot); |
@@ -3537,7 +3537,7 @@ static int do_cow_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
3537 | if (!new_page) | 3537 | if (!new_page) |
3538 | return VM_FAULT_OOM; | 3538 | return VM_FAULT_OOM; |
3539 | 3539 | ||
3540 | if (mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL)) { | 3540 | if (mem_cgroup_charge_anon(new_page, mm, GFP_KERNEL)) { |
3541 | page_cache_release(new_page); | 3541 | page_cache_release(new_page); |
3542 | return VM_FAULT_OOM; | 3542 | return VM_FAULT_OOM; |
3543 | } | 3543 | } |