]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hugetlb: migrate memcg info from oldpage to new page during migration
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wed, 25 Apr 2012 01:03:38 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:22 +0000 (15:17 +1000)
commit8cb89fa248742c1cd6008f49d6ec032e2d2fc86b
tree27590e2a5037f24f47c5d2722985d42733698512
parent18eec587c6697c3f483675bfde72d12ebe32eac0
hugetlb: migrate memcg info from oldpage to new page during migration

With HugeTLB pages, memcg is uncharged in compound page destructor.  Since
we are holding a hugepage reference, we can be sure that old page won't
get uncharged till the last put_page().  On successful migrate, we can
move the memcg information to new page's page_cgroup and mark the old
page's page_cgroup unused.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: 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>
include/linux/memcontrol.h
mm/memcontrol.c
mm/migrate.c