Currently memory cgroup doesn't charge hugepage, so avoid calling these functions in hugepage migration context. Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Signed-off-by: Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx> --- mm/memcontrol.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git v2.6.35-rc3-hwpoison/mm/memcontrol.c v2.6.35-rc3-hwpoison/mm/memcontrol.c index c6ece0a..fed32de 100644 --- v2.6.35-rc3-hwpoison/mm/memcontrol.c +++ v2.6.35-rc3-hwpoison/mm/memcontrol.c @@ -2504,6 +2504,8 @@ int mem_cgroup_prepare_migration(struct page *page, if (mem_cgroup_disabled()) return 0; + if (PageHuge(page)) + return 0; pc = lookup_page_cgroup(page); lock_page_cgroup(pc); @@ -2591,6 +2593,9 @@ void mem_cgroup_end_migration(struct mem_cgroup *mem, if (!mem) return; + if (PageHuge(oldpage)) + return; + /* blocks rmdir() */ cgroup_exclude_rmdir(&mem->css); /* at migration success, oldpage->mapping is NULL. */ -- 1.7.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>