Commit 65b3c07b43f7f8a5cbf8923011bd4e6650e3d1dc

Authored by Xiao Guangrong
Committed by Linus Torvalds
1 parent db97141882

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -1874,9 +1874,9 @@
1874 1874 *hpage = ERR_PTR(-ENOMEM);
1875 1875 return;
1876 1876 }
  1877 + count_vm_event(THP_COLLAPSE_ALLOC);
1877 1878 #endif
1878 1879  
1879   - count_vm_event(THP_COLLAPSE_ALLOC);
1880 1880 if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
1881 1881 #ifdef CONFIG_NUMA
1882 1882 put_page(new_page);