]> Git Repo - linux.git/commit
mm/memcg: apply add/del_page to lruvec
authorHugh Dickins <[email protected]>
Tue, 29 May 2012 22:07:09 +0000 (15:07 -0700)
committerLinus Torvalds <[email protected]>
Tue, 29 May 2012 23:22:28 +0000 (16:22 -0700)
commitfa9add641b1b1c564db916accac1db346e7a2759
tree875e74ec4d7fed0018fdbc134ad899949c5e3384
parent75b00af77ed5b5a3d55549f9e0c33f3969b9330c
mm/memcg: apply add/del_page to lruvec

Take lruvec further: pass it instead of zone to add_page_to_lru_list() and
del_page_from_lru_list(); and pagevec_lru_move_fn() pass lruvec down to
its target functions.

This cleanup eliminates a swathe of cruft in memcontrol.c, including
mem_cgroup_lru_add_list(), mem_cgroup_lru_del_list() and
mem_cgroup_lru_move_lists() - which never actually touched the lists.

In their place, mem_cgroup_page_lruvec() to decide the lruvec, previously
a side-effect of add, and mem_cgroup_update_lru_size() to maintain the
lru_size stats.

Whilst these are simplifications in their own right, the goal is to bring
the evaluation of lruvec next to the spin_locking of the lrus, in
preparation for a future patch.

Signed-off-by: Hugh Dickins <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Konstantin Khlebnikov <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/memcontrol.h
include/linux/mm_inline.h
include/linux/swap.h
mm/compaction.c
mm/huge_memory.c
mm/memcontrol.c
mm/swap.c
mm/vmscan.c
This page took 0.056171 seconds and 4 git commands to generate.