Skip to contentSkip to conversation

mm/vmstats: add thp_split_pud event for clarity

PATCH New [email protected] 1 participant 1 message Mar 10, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 12/26 mm/vmstats: add thp_split_pud event for clarity

From: Yisheng Xie <[email protected]>
Subject: 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.

Cc Vlastimil Babka <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Sebastian Siewior <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Kirill A. Shutemov <[email protected]>
Cc Aneesh Kumar K.V <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Ebru Akagunduz <[email protected]>
Cc David Rientjes <[email protected]>
Cc Hanjun Guo <[email protected]>

---

 include/linux/vm_event_item.h |    3 +++
 mm/huge_memory.c              |    2 +-
 mm/vmstat.c                   |    3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)
include/linux/vm_event_item.h renamed from include/linux/vm_event_item.h~mm-vmstats-add-thp_split_pud-event-for-clarify +3 -0
diff -puN include/linux/vm_event_item.h~mm-vmstats-add-thp_split_pud-event-for-clarify include/linux/vm_event_item.h
@@ -79,6 +79,9 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS
 		THP_SPLIT_PAGE_FAILED,
 		THP_DEFERRED_SPLIT_PAGE,
 		THP_SPLIT_PMD,
+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
+		THP_SPLIT_PUD,
+#endif
 		THP_ZERO_PAGE_ALLOC,
 		THP_ZERO_PAGE_ALLOC_FAILED,
 #endif
mm/huge_memory.c renamed from mm/huge_memory.c~mm-vmstats-add-thp_split_pud-event-for-clarify +1 -1
diff -puN mm/huge_memory.c~mm-vmstats-add-thp_split_pud-event-for-clarify mm/huge_memory.c
@@ -1828,7 +1828,7 @@ static void __split_huge_pud_locked(stru
 	VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PUD_SIZE, vma);
 	VM_BUG_ON(!pud_trans_huge(*pud) && !pud_devmap(*pud));
 
-	count_vm_event(THP_SPLIT_PMD);
+	count_vm_event(THP_SPLIT_PUD);
 
 	pudp_huge_clear_flush_notify(vma, haddr, pud);
 }
mm/vmstat.c renamed from mm/vmstat.c~mm-vmstats-add-thp_split_pud-event-for-clarify +3 -0
diff -puN mm/vmstat.c~mm-vmstats-add-thp_split_pud-event-for-clarify mm/vmstat.c
@@ -1065,6 +1065,9 @@ const char * const vmstat_text[] = {
 	"thp_split_page_failed",
 	"thp_deferred_split_page",
 	"thp_split_pmd",
+#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
+	"thp_split_pud",
+#endif
 	"thp_zero_page_alloc",
 	"thp_zero_page_alloc_failed",
 #endif

_