]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
thp: fix the count of THP_COLLAPSE_ALLOC
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Mon, 8 Oct 2012 23:29:35 +0000 (16:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Oct 2012 07:22:25 +0000 (16:22 +0900)
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 <xiaoguangrong@linux.vnet.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c

index 9b72d1270519c96bc614e0741ceb5db18caf3145..860ea912785148a41bd02e86e5299aeafa826e00 100644 (file)
@@ -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);