aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2008-03-04 17:29:03 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-04 19:35:14 -0500
commit427d5416f317681498337ab19218d195edea02d6 (patch)
tree967cfc87ec775ca3c05f95f2339697e796383191 /mm/vmscan.c
parentbd845e38c7a7251a95a8f2c38aa7fb87140b771d (diff)
memcg: move_lists on page not page_cgroup
Each caller of mem_cgroup_move_lists is having to use page_get_page_cgroup: it's more convenient if it acts upon the page itself not the page_cgroup; and in a later patch this becomes important to handle within memcontrol.c. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: 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>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 106ba10e1ac6..45711585684e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1128,7 +1128,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1128 ClearPageActive(page); 1128 ClearPageActive(page);
1129 1129
1130 list_move(&page->lru, &zone->inactive_list); 1130 list_move(&page->lru, &zone->inactive_list);
1131 mem_cgroup_move_lists(page_get_page_cgroup(page), false); 1131 mem_cgroup_move_lists(page, false);
1132 pgmoved++; 1132 pgmoved++;
1133 if (!pagevec_add(&pvec, page)) { 1133 if (!pagevec_add(&pvec, page)) {
1134 __mod_zone_page_state(zone, NR_INACTIVE, pgmoved); 1134 __mod_zone_page_state(zone, NR_INACTIVE, pgmoved);
@@ -1156,8 +1156,9 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
1156 VM_BUG_ON(PageLRU(page)); 1156 VM_BUG_ON(PageLRU(page));
1157 SetPageLRU(page); 1157 SetPageLRU(page);
1158 VM_BUG_ON(!PageActive(page)); 1158 VM_BUG_ON(!PageActive(page));
1159
1159 list_move(&page->lru, &zone->active_list); 1160 list_move(&page->lru, &zone->active_list);
1160 mem_cgroup_move_lists(page_get_page_cgroup(page), true); 1161 mem_cgroup_move_lists(page, true);
1161 pgmoved++; 1162 pgmoved++;
1162 if (!pagevec_add(&pvec, page)) { 1163 if (!pagevec_add(&pvec, page)) {
1163 __mod_zone_page_state(zone, NR_ACTIVE, pgmoved); 1164 __mod_zone_page_state(zone, NR_ACTIVE, pgmoved);