summaryrefslogtreecommitdiffstats
path: root/mm/khugepaged.c
diff options
context:
space:
mode:
authorYang Shi2018-08-18 00:45:29 +0200
committerLinus Torvalds2018-08-18 01:20:28 +0200
commit87aa752906ecf69842ef5ac1d0677aa75a4e0aac (patch)
treeb51124e7e0b07ca04007725bf594a1ae11176f0c /mm/khugepaged.c
parentmm: thp: register mm for khugepaged when merging vma for shmem (diff)
downloadkernel-qcow2-linux-87aa752906ecf69842ef5ac1d0677aa75a4e0aac.tar.gz
kernel-qcow2-linux-87aa752906ecf69842ef5ac1d0677aa75a4e0aac.tar.xz
kernel-qcow2-linux-87aa752906ecf69842ef5ac1d0677aa75a4e0aac.zip
mm: thp: inc counter for collapsed shmem THP
/sys/kernel/mm/transparent_hugepage/khugepaged/pages_collapsed is used to record the counter of collapsed THP, but it just gets inc'ed in anonymous THP collapse path, do this for shmem THP collapse too. Link: http://lkml.kernel.org/r/1529622949-75504-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/khugepaged.c')
-rw-r--r--mm/khugepaged.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index 22da712022de..79d55e10bca9 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1516,6 +1516,8 @@ tree_unlocked:
unlock_page(new_page);
*hpage = NULL;
+
+ khugepaged_pages_collapsed++;
} else {
/* Something went wrong: rollback changes to the radix-tree */
shmem_uncharge(mapping->host, nr_none);