[PATCH] mm/hugetlb_cgroup: Add huge_page_order check to avoid incorrectly uncharge

2012-07-10 Thread Wanpeng Li
From: Wanpeng Li Against linux-next: Function alloc_huge_page will call hugetlb_cgroup_charge_cgroup to charge pages, the compound page have less than 3 pages will not charge to hugetlb cgroup. When alloc_huge_page fails it will call hugetlb_cgroup_uncharge_cgroup to uncharge pages, however,

[PATCH] mm/hugetlb_cgroup: Add huge_page_order check to avoid incorrectly uncharge

2012-07-10 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com Against linux-next: Function alloc_huge_page will call hugetlb_cgroup_charge_cgroup to charge pages, the compound page have less than 3 pages will not charge to hugetlb cgroup. When alloc_huge_page fails it will call hugetlb_cgroup_uncharge_cgroup to