Re: [PATCH -V3 3/8] hugetlb: add charge/uncharge calls for HugeTLB alloc/free
From: Glauber Costa <hidden>
Date: 2012-03-13 13:33:48
Also in:
linux-mm
From: Glauber Costa <hidden>
Date: 2012-03-13 13:33:48
Also in:
linux-mm
On 03/13/2012 11:07 AM, Aneesh Kumar K.V wrote:
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 8cac77b..f4aa11c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c@@ -2901,6 +2901,11 @@ __mem_cgroup_uncharge_common(struct page *page, enum charge_type ctype) if (PageSwapCache(page)) return NULL; + /* + * HugeTLB page uncharge happen in the HugeTLB compound page destructor + */ + if (PageHuge(page)) + return NULL;
Maybe it is better to call uncharge_common from the compound destructor, so we can have all the uncharge code in a single place. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>