summaryrefslogtreecommitdiffstats
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2012-10-08 16:29:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 16:22:25 +0900
commit65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc (patch)
treef58f86178f2ce1998f80fc90717f3c2ae87551e6 /mm/huge_memory.c
parentdb971418824381d3583c73751181fec76c743bf6 (diff)
downloadlinux-65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc.tar.gz
linux-65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc.tar.xz
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 <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>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c2
1 files changed, 1 insertions, 1 deletions
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);