From 8c6d6e78e3f6991664708dcd94bb0b27eeeac1c2 Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Fri, 28 Sep 2012 10:19:15 +1000 Subject: [PATCH] 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 --- mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 18ef053ab37f..d4b257197bb7 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1959,9 +1959,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); -- 2.39.5