xref: /linux/include/linux/vm_event_item.h (revision 0883c2c06fb5bcf5b9e008270827e63c09a88c1e)
1 #ifndef VM_EVENT_ITEM_H_INCLUDED
2 #define VM_EVENT_ITEM_H_INCLUDED
3 
4 #ifdef CONFIG_ZONE_DMA
5 #define DMA_ZONE(xx) xx##_DMA,
6 #else
7 #define DMA_ZONE(xx)
8 #endif
9 
10 #ifdef CONFIG_ZONE_DMA32
11 #define DMA32_ZONE(xx) xx##_DMA32,
12 #else
13 #define DMA32_ZONE(xx)
14 #endif
15 
16 #ifdef CONFIG_HIGHMEM
17 #define HIGHMEM_ZONE(xx) xx##_HIGH,
18 #else
19 #define HIGHMEM_ZONE(xx)
20 #endif
21 
22 #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
23 
24 enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
25 		FOR_ALL_ZONES(PGALLOC),
26 		PGFREE, PGACTIVATE, PGDEACTIVATE,
27 		PGFAULT, PGMAJFAULT,
28 		PGLAZYFREED,
29 		FOR_ALL_ZONES(PGREFILL),
30 		FOR_ALL_ZONES(PGSTEAL_KSWAPD),
31 		FOR_ALL_ZONES(PGSTEAL_DIRECT),
32 		FOR_ALL_ZONES(PGSCAN_KSWAPD),
33 		FOR_ALL_ZONES(PGSCAN_DIRECT),
34 		PGSCAN_DIRECT_THROTTLE,
35 #ifdef CONFIG_NUMA
36 		PGSCAN_ZONE_RECLAIM_FAILED,
37 #endif
38 		PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
39 		KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
40 		PAGEOUTRUN, ALLOCSTALL, PGROTATED,
41 		DROP_PAGECACHE, DROP_SLAB,
42 #ifdef CONFIG_NUMA_BALANCING
43 		NUMA_PTE_UPDATES,
44 		NUMA_HUGE_PTE_UPDATES,
45 		NUMA_HINT_FAULTS,
46 		NUMA_HINT_FAULTS_LOCAL,
47 		NUMA_PAGE_MIGRATE,
48 #endif
49 #ifdef CONFIG_MIGRATION
50 		PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
51 #endif
52 #ifdef CONFIG_COMPACTION
53 		COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
54 		COMPACTISOLATED,
55 		COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
56 		KCOMPACTD_WAKE,
57 #endif
58 #ifdef CONFIG_HUGETLB_PAGE
59 		HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
60 #endif
61 		UNEVICTABLE_PGCULLED,	/* culled to noreclaim list */
62 		UNEVICTABLE_PGSCANNED,	/* scanned for reclaimability */
63 		UNEVICTABLE_PGRESCUED,	/* rescued from noreclaim list */
64 		UNEVICTABLE_PGMLOCKED,
65 		UNEVICTABLE_PGMUNLOCKED,
66 		UNEVICTABLE_PGCLEARED,	/* on COW, page truncate */
67 		UNEVICTABLE_PGSTRANDED,	/* unable to isolate on unlock */
68 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
69 		THP_FAULT_ALLOC,
70 		THP_FAULT_FALLBACK,
71 		THP_COLLAPSE_ALLOC,
72 		THP_COLLAPSE_ALLOC_FAILED,
73 		THP_SPLIT_PAGE,
74 		THP_SPLIT_PAGE_FAILED,
75 		THP_DEFERRED_SPLIT_PAGE,
76 		THP_SPLIT_PMD,
77 		THP_ZERO_PAGE_ALLOC,
78 		THP_ZERO_PAGE_ALLOC_FAILED,
79 #endif
80 #ifdef CONFIG_MEMORY_BALLOON
81 		BALLOON_INFLATE,
82 		BALLOON_DEFLATE,
83 #ifdef CONFIG_BALLOON_COMPACTION
84 		BALLOON_MIGRATE,
85 #endif
86 #endif
87 #ifdef CONFIG_DEBUG_TLBFLUSH
88 #ifdef CONFIG_SMP
89 		NR_TLB_REMOTE_FLUSH,	/* cpu tried to flush others' tlbs */
90 		NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
91 #endif /* CONFIG_SMP */
92 		NR_TLB_LOCAL_FLUSH_ALL,
93 		NR_TLB_LOCAL_FLUSH_ONE,
94 #endif /* CONFIG_DEBUG_TLBFLUSH */
95 #ifdef CONFIG_DEBUG_VM_VMACACHE
96 		VMACACHE_FIND_CALLS,
97 		VMACACHE_FIND_HITS,
98 		VMACACHE_FULL_FLUSHES,
99 #endif
100 		NR_VM_EVENT_ITEMS
101 };
102 
103 #endif		/* VM_EVENT_ITEM_H_INCLUDED */
104