aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYisheng Xie <xieyisheng1@huawei.com>2017-03-09 19:17:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-09 20:01:10 -0500
commitce9311cf95ad8baf044a014738d76973d93b739a (patch)
tree46a91db8c3972c421eac707b0fdf2bd61baed2da
parentcbfd0c1001bedb4b051cf4a1f5df24f1500381bc (diff)
mm/vmstats: add thp_split_pud event for clarity
We added support for PUD-sized transparent hugepages, however we count the event "thp split pud" into thp_split_pmd event. To separate the event count of thp split pud from pmd, add a new event named thp_split_pud. Link: http://lkml.kernel.org/r/1488282380-5076-1-git-send-email-xieyisheng1@huawei.com Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Hugh Dickins <hughd@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Ebru Akagunduz <ebru.akagunduz@gmail.com> Cc: David Rientjes <rientjes@google.com> Cc: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/vm_event_item.h3
-rw-r--r--mm/huge_memory.c2
-rw-r--r--mm/vmstat.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h
index 6aa1b6cb5828..a80b7b59cf33 100644
--- a/include/linux/vm_event_item.h
+++ b/include/linux/vm_event_item.h
@@ -79,6 +79,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
79 THP_SPLIT_PAGE_FAILED, 79 THP_SPLIT_PAGE_FAILED,
80 THP_DEFERRED_SPLIT_PAGE, 80 THP_DEFERRED_SPLIT_PAGE,
81 THP_SPLIT_PMD, 81 THP_SPLIT_PMD,
82#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
83 THP_SPLIT_PUD,
84#endif
82 THP_ZERO_PAGE_ALLOC, 85 THP_ZERO_PAGE_ALLOC,
83 THP_ZERO_PAGE_ALLOC_FAILED, 86 THP_ZERO_PAGE_ALLOC_FAILED,
84#endif 87#endif
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index d36b2af4d1bf..8f037e256c54 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1828,7 +1828,7 @@ static void __split_huge_pud_locked(struct vm_area_struct *vma, pud_t *pud,
1828 VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PUD_SIZE, vma); 1828 VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PUD_SIZE, vma);
1829 VM_BUG_ON(!pud_trans_huge(*pud) && !pud_devmap(*pud)); 1829 VM_BUG_ON(!pud_trans_huge(*pud) && !pud_devmap(*pud));
1830 1830
1831 count_vm_event(THP_SPLIT_PMD); 1831 count_vm_event(THP_SPLIT_PUD);
1832 1832
1833 pudp_huge_clear_flush_notify(vma, haddr, pud); 1833 pudp_huge_clear_flush_notify(vma, haddr, pud);
1834} 1834}
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 69f9aff39a2e..b1947f0cbee2 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1065,6 +1065,9 @@ const char * const vmstat_text[] = {
1065 "thp_split_page_failed", 1065 "thp_split_page_failed",
1066 "thp_deferred_split_page", 1066 "thp_deferred_split_page",
1067 "thp_split_pmd", 1067 "thp_split_pmd",
1068#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
1069 "thp_split_pud",
1070#endif
1068 "thp_zero_page_alloc", 1071 "thp_zero_page_alloc",
1069 "thp_zero_page_alloc_failed", 1072 "thp_zero_page_alloc_failed",
1070#endif 1073#endif