]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hugetlb: add charge/uncharge calls for HugeTLB alloc/free
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 25 Apr 2012 01:03:35 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:20 +0000 (15:17 +1000)
commit66b229cc8c5529bc1b371fc834a146ce0ac74852
tree5d321eea045dc2d39bcca05464ae7acb6b6e5b96
parente3e37ad780bc077e6ce31bc153c9b2e29dd3280b
hugetlb: add charge/uncharge calls for HugeTLB alloc/free

This adds necessary charge/uncharge calls in the HugeTLB code.  We do
memcg charge in page alloc and uncharge in compound page destructor.  We
also need to ignore HugeTLB pages in __mem_cgroup_uncharge_common because
that get called from delete_from_page_cache

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Hillf Danton <dhillf@gmail.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c
mm/memcontrol.c