mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Cc: David Rientjes <[email protected]> Acked-by: Balbir Singh <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Hirokazu Takahashi <[email protected]> Cc: YAMAMOTO Takashi <[email protected]> Cc: Paul Menage <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
bd845e38c7
commit
427d5416f3
4 changed files with 9 additions and 7 deletions
|
|
@ -1128,7 +1128,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
|
|||
ClearPageActive(page);
|
||||
|
||||
list_move(&page->lru, &zone->inactive_list);
|
||||
mem_cgroup_move_lists(page_get_page_cgroup(page), false);
|
||||
mem_cgroup_move_lists(page, false);
|
||||
pgmoved++;
|
||||
if (!pagevec_add(&pvec, page)) {
|
||||
__mod_zone_page_state(zone, NR_INACTIVE, pgmoved);
|
||||
|
|
@ -1156,8 +1156,9 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
|
|||
VM_BUG_ON(PageLRU(page));
|
||||
SetPageLRU(page);
|
||||
VM_BUG_ON(!PageActive(page));
|
||||
|
||||
list_move(&page->lru, &zone->active_list);
|
||||
mem_cgroup_move_lists(page_get_page_cgroup(page), true);
|
||||
mem_cgroup_move_lists(page, true);
|
||||
pgmoved++;
|
||||
if (!pagevec_add(&pvec, page)) {
|
||||
__mod_zone_page_state(zone, NR_ACTIVE, pgmoved);
|
||||
|
|
|
|||
Loading…
Reference in a new issue