]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: memcontrol: clean up memcg zoneinfo lookup
authorJianyu Zhan <nasa4836@gmail.com>
Sat, 17 May 2014 13:19:28 +0000 (23:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 May 2014 07:35:03 +0000 (17:35 +1000)
commitefc128c19b97ccb98304bc9760d087cfe2255b19
tree4b69558c1de0be5c2e417b533b500cd4d5c6ee25
parent1009a51e975acd0aad28892dadd26fbba5e25719
mm: memcontrol: clean up memcg zoneinfo lookup

Memcg zoneinfo lookup sites have either the page, the zone, or the node id
and zone index, but sites that only have the zone have to look up the node
id and zone index themselves, whereas sites that already have those two
integers use a function for a simple pointer chase.

Provide mem_cgroup_zone_zoneinfo() that takes a zone pointer and let sites
that already have node id and zone index - all for each node, for each
zone iterators - use &memcg->nodeinfo[nid]->zoneinfo[zid].

Rename page_cgroup_zoneinfo() to mem_cgroup_page_zoneinfo() to match.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c