aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
authorJohannes Weiner <jweiner@redhat.com>2012-01-12 20:18:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-12 23:13:06 -0500
commit72835c86ca15d0126354b73d5f29ce9194931c9b (patch)
tree369f31168b405e4d597b3cd067a1fd0ac2025dbc /mm/rmap.c
parentec0fffd84b162e0563a28a81aa049f946b31a8e2 (diff)
mm: unify remaining mem_cont, mem, etc. variable names to memcg
Signed-off-by: Johannes Weiner <jweiner@redhat.com> Acked-by: David Rientjes <rientjes@google.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Balbir Singh <bsingharora@gmail.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index a2e5ce1fa081..c8454e06b6c8 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -773,7 +773,7 @@ out:
773} 773}
774 774
775static int page_referenced_anon(struct page *page, 775static int page_referenced_anon(struct page *page,
776 struct mem_cgroup *mem_cont, 776 struct mem_cgroup *memcg,
777 unsigned long *vm_flags) 777 unsigned long *vm_flags)
778{ 778{
779 unsigned int mapcount; 779 unsigned int mapcount;
@@ -796,7 +796,7 @@ static int page_referenced_anon(struct page *page,
796 * counting on behalf of references from different 796 * counting on behalf of references from different
797 * cgroups 797 * cgroups
798 */ 798 */
799 if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) 799 if (memcg && !mm_match_cgroup(vma->vm_mm, memcg))
800 continue; 800 continue;
801 referenced += page_referenced_one(page, vma, address, 801 referenced += page_referenced_one(page, vma, address,
802 &mapcount, vm_flags); 802 &mapcount, vm_flags);
@@ -811,7 +811,7 @@ static int page_referenced_anon(struct page *page,
811/** 811/**
812 * page_referenced_file - referenced check for object-based rmap 812 * page_referenced_file - referenced check for object-based rmap
813 * @page: the page we're checking references on. 813 * @page: the page we're checking references on.
814 * @mem_cont: target memory controller 814 * @memcg: target memory control group
815 * @vm_flags: collect encountered vma->vm_flags who actually referenced the page 815 * @vm_flags: collect encountered vma->vm_flags who actually referenced the page
816 * 816 *
817 * For an object-based mapped page, find all the places it is mapped and 817 * For an object-based mapped page, find all the places it is mapped and
@@ -822,7 +822,7 @@ static int page_referenced_anon(struct page *page,
822 * This function is only called from page_referenced for object-based pages. 822 * This function is only called from page_referenced for object-based pages.
823 */ 823 */
824static int page_referenced_file(struct page *page, 824static int page_referenced_file(struct page *page,
825 struct mem_cgroup *mem_cont, 825 struct mem_cgroup *memcg,
826 unsigned long *vm_flags) 826 unsigned long *vm_flags)
827{ 827{
828 unsigned int mapcount; 828 unsigned int mapcount;
@@ -864,7 +864,7 @@ static int page_referenced_file(struct page *page,
864 * counting on behalf of references from different 864 * counting on behalf of references from different
865 * cgroups 865 * cgroups
866 */ 866 */
867 if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) 867 if (memcg && !mm_match_cgroup(vma->vm_mm, memcg))
868 continue; 868 continue;
869 referenced += page_referenced_one(page, vma, address, 869 referenced += page_referenced_one(page, vma, address,
870 &mapcount, vm_flags); 870 &mapcount, vm_flags);
@@ -880,7 +880,7 @@ static int page_referenced_file(struct page *page,
880 * page_referenced - test if the page was referenced 880 * page_referenced - test if the page was referenced
881 * @page: the page to test 881 * @page: the page to test
882 * @is_locked: caller holds lock on the page 882 * @is_locked: caller holds lock on the page
883 * @mem_cont: target memory controller 883 * @memcg: target memory cgroup
884 * @vm_flags: collect encountered vma->vm_flags who actually referenced the page 884 * @vm_flags: collect encountered vma->vm_flags who actually referenced the page
885 * 885 *
886 * Quick test_and_clear_referenced for all mappings to a page, 886 * Quick test_and_clear_referenced for all mappings to a page,
@@ -888,7 +888,7 @@ static int page_referenced_file(struct page *page,
888 */ 888 */
889int page_referenced(struct page *page, 889int page_referenced(struct page *page,
890 int is_locked, 890 int is_locked,
891 struct mem_cgroup *mem_cont, 891 struct mem_cgroup *memcg,
892 unsigned long *vm_flags) 892 unsigned long *vm_flags)
893{ 893{
894 int referenced = 0; 894 int referenced = 0;
@@ -904,13 +904,13 @@ int page_referenced(struct page *page,
904 } 904 }
905 } 905 }
906 if (unlikely(PageKsm(page))) 906 if (unlikely(PageKsm(page)))
907 referenced += page_referenced_ksm(page, mem_cont, 907 referenced += page_referenced_ksm(page, memcg,
908 vm_flags); 908 vm_flags);
909 else if (PageAnon(page)) 909 else if (PageAnon(page))
910 referenced += page_referenced_anon(page, mem_cont, 910 referenced += page_referenced_anon(page, memcg,
911 vm_flags); 911 vm_flags);
912 else if (page->mapping) 912 else if (page->mapping)
913 referenced += page_referenced_file(page, mem_cont, 913 referenced += page_referenced_file(page, memcg,
914 vm_flags); 914 vm_flags);
915 if (we_locked) 915 if (we_locked)
916 unlock_page(page); 916 unlock_page(page);