1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef VM_EVENT_ITEM_H_INCLUDED
3 #define VM_EVENT_ITEM_H_INCLUDED
6 #define DMA_ZONE(xx) xx##_DMA,
11 #ifdef CONFIG_ZONE_DMA32
12 #define DMA32_ZONE(xx) xx##_DMA32,
14 #define DMA32_ZONE(xx)
18 #define HIGHMEM_ZONE(xx) xx##_HIGH,
20 #define HIGHMEM_ZONE(xx)
23 #ifdef CONFIG_ZONE_DEVICE
24 #define DEVICE_ZONE(xx) xx##_DEVICE,
26 #define DEVICE_ZONE(xx)
29 #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, \
30 HIGHMEM_ZONE(xx) xx##_MOVABLE, DEVICE_ZONE(xx)
32 enum vm_event_item
{ PGPGIN
, PGPGOUT
, PSWPIN
, PSWPOUT
,
33 FOR_ALL_ZONES(PGALLOC
)
34 FOR_ALL_ZONES(ALLOCSTALL
)
35 FOR_ALL_ZONES(PGSCAN_SKIP
)
36 PGFREE
, PGACTIVATE
, PGDEACTIVATE
, PGLAZYFREE
,
47 PGSCAN_DIRECT_THROTTLE
,
53 PGSCAN_ZONE_RECLAIM_SUCCESS
,
54 PGSCAN_ZONE_RECLAIM_FAILED
,
56 PGINODESTEAL
, SLABS_SCANNED
, KSWAPD_INODESTEAL
,
57 KSWAPD_LOW_WMARK_HIT_QUICKLY
, KSWAPD_HIGH_WMARK_HIT_QUICKLY
,
58 PAGEOUTRUN
, PGROTATED
,
59 DROP_PAGECACHE
, DROP_SLAB
,
61 #ifdef CONFIG_NUMA_BALANCING
63 NUMA_HUGE_PTE_UPDATES
,
65 NUMA_HINT_FAULTS_LOCAL
,
68 #ifdef CONFIG_MIGRATION
69 PGMIGRATE_SUCCESS
, PGMIGRATE_FAIL
,
70 THP_MIGRATION_SUCCESS
,
74 #ifdef CONFIG_COMPACTION
75 COMPACTMIGRATE_SCANNED
, COMPACTFREE_SCANNED
,
77 COMPACTSTALL
, COMPACTFAIL
, COMPACTSUCCESS
,
79 KCOMPACTD_MIGRATE_SCANNED
, KCOMPACTD_FREE_SCANNED
,
81 #ifdef CONFIG_HUGETLB_PAGE
82 HTLB_BUDDY_PGALLOC
, HTLB_BUDDY_PGALLOC_FAIL
,
88 UNEVICTABLE_PGCULLED
, /* culled to noreclaim list */
89 UNEVICTABLE_PGSCANNED
, /* scanned for reclaimability */
90 UNEVICTABLE_PGRESCUED
, /* rescued from noreclaim list */
91 UNEVICTABLE_PGMLOCKED
,
92 UNEVICTABLE_PGMUNLOCKED
,
93 UNEVICTABLE_PGCLEARED
, /* on COW, page truncate */
94 UNEVICTABLE_PGSTRANDED
, /* unable to isolate on unlock */
95 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
98 THP_FAULT_FALLBACK_CHARGE
,
100 THP_COLLAPSE_ALLOC_FAILED
,
103 THP_FILE_FALLBACK_CHARGE
,
106 THP_SPLIT_PAGE_FAILED
,
107 THP_DEFERRED_SPLIT_PAGE
,
108 THP_UNDERUSED_SPLIT_PAGE
,
110 THP_SCAN_EXCEED_NONE_PTE
,
111 THP_SCAN_EXCEED_SWAP_PTE
,
112 THP_SCAN_EXCEED_SHARED_PTE
,
113 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
117 THP_ZERO_PAGE_ALLOC_FAILED
,
121 #ifdef CONFIG_MEMORY_BALLOON
124 #ifdef CONFIG_BALLOON_COMPACTION
128 #ifdef CONFIG_DEBUG_TLBFLUSH
129 NR_TLB_REMOTE_FLUSH
, /* cpu tried to flush others' tlbs */
130 NR_TLB_REMOTE_FLUSH_RECEIVED
,/* cpu received ipi for flush */
131 NR_TLB_LOCAL_FLUSH_ALL
,
132 NR_TLB_LOCAL_FLUSH_ONE
,
133 #endif /* CONFIG_DEBUG_TLBFLUSH */
152 DIRECT_MAP_LEVEL2_SPLIT
,
153 DIRECT_MAP_LEVEL3_SPLIT
,
155 #ifdef CONFIG_PER_VMA_LOCK_STATS
161 #ifdef CONFIG_DEBUG_STACK_USAGE
163 #if THREAD_SIZE > 1024
166 #if THREAD_SIZE > 2048
169 #if THREAD_SIZE > 4096
172 #if THREAD_SIZE > 8192
175 #if THREAD_SIZE > 16384
178 #if THREAD_SIZE > 32768
181 #if THREAD_SIZE > 65536
184 #endif /* CONFIG_DEBUG_STACK_USAGE */
188 #ifndef CONFIG_TRANSPARENT_HUGEPAGE
189 #define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
190 #define THP_FILE_FALLBACK ({ BUILD_BUG(); 0; })
191 #define THP_FILE_FALLBACK_CHARGE ({ BUILD_BUG(); 0; })
192 #define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
195 #endif /* VM_EVENT_ITEM_H_INCLUDED */