From: Xiao Guangrong Date: Mon, 8 Oct 2012 23:29:35 +0000 (-0700) Subject: thp: fix the count of THP_COLLAPSE_ALLOC X-Git-Tag: v3.7-rc1~53^2~136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc;p=platform%2Fkernel%2Flinux-exynos.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 Signed-off-by: Linus Torvalds --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9b72d12..860ea91 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1874,9 +1874,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);