diff options
author | Yang Shi <yang.shi@linux.alibaba.com> | 2018-08-17 15:45:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-17 16:20:28 -0700 |
commit | 87aa752906ecf69842ef5ac1d0677aa75a4e0aac (patch) | |
tree | b51124e7e0b07ca04007725bf594a1ae11176f0c /mm/khugepaged.c | |
parent | c2231020ea7b53d486395dbd8d3216e0dd1fc7ee (diff) |
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.c | 2 |
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); |