From: Xiao Guangrong Date: Fri, 28 Sep 2012 00:19:15 +0000 (+1000) Subject: thp: fix the count of THP_COLLAPSE_ALLOC X-Git-Tag: next-20121004~1^2~334 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b51b0c326285a239ece544f19991cfe970f828d2;p=karo-tx-linux.git thp: fix the count of THP_COLLAPSE_ALLOC THP_COLLAPSE_ALLOC is double counted if NUMA is disabled since it has already been calculated in khugepaged_alloc_hugepage Signed-off-by: Xiao Guangrong Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: David Rientjes Signed-off-by: Andrew Morton --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 963051dc95da..13a1ff52c42a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1942,9 +1942,9 @@ static void collapse_huge_page(struct mm_struct *mm, *hpage = ERR_PTR(-ENOMEM); return; } + count_vm_event(THP_COLLAPSE_ALLOC); #endif - count_vm_event(THP_COLLAPSE_ALLOC); if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { #ifdef CONFIG_NUMA put_page(new_page);