From: Xiao Guangrong Date: Mon, 8 Oct 2012 23:29:35 +0000 (-0700) Subject: thp: fix the count of THP_COLLAPSE_ALLOC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 9b72d1270519..860ea9127851 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);