memcg: change page_cgroup_zoneinfo signature
Instead of passing a whole struct page_cgroup to this function, let it take only what it really needs from it: the struct mem_cgroup and the page. This has the advantage that reading pc->mem_cgroup is now done at the same place where the ordering rules for this pointer are enforced and explained. It is also in preparation for removing the pc->page backpointer. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
ad324e9447
commit
97a6c37b34
@@ -85,16 +85,6 @@ SETPCGFLAG(Migration, MIGRATION)
|
||||
CLEARPCGFLAG(Migration, MIGRATION)
|
||||
TESTPCGFLAG(Migration, MIGRATION)
|
||||
|
||||
static inline int page_cgroup_nid(struct page_cgroup *pc)
|
||||
{
|
||||
return page_to_nid(pc->page);
|
||||
}
|
||||
|
||||
static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc)
|
||||
{
|
||||
return page_zonenum(pc->page);
|
||||
}
|
||||
|
||||
static inline void lock_page_cgroup(struct page_cgroup *pc)
|
||||
{
|
||||
/*
|
||||
|
Reference in New Issue
Block a user