xref: /linux/include/linux/vm_event_item.h (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
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 		FOR_ALL_ZONES(PGREFILL),
29 		FOR_ALL_ZONES(PGSTEAL_KSWAPD),
30 		FOR_ALL_ZONES(PGSTEAL_DIRECT),
31 		FOR_ALL_ZONES(PGSCAN_KSWAPD),
32 		FOR_ALL_ZONES(PGSCAN_DIRECT),
33 		PGSCAN_DIRECT_THROTTLE,
34 #ifdef CONFIG_NUMA
35 		PGSCAN_ZONE_RECLAIM_FAILED,
36 #endif
37 		PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
38 		KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
39 		PAGEOUTRUN, ALLOCSTALL, PGROTATED,
40 		DROP_PAGECACHE, DROP_SLAB,
41 #ifdef CONFIG_NUMA_BALANCING
42 		NUMA_PTE_UPDATES,
43 		NUMA_HUGE_PTE_UPDATES,
44 		NUMA_HINT_FAULTS,
45 		NUMA_HINT_FAULTS_LOCAL,
46 		NUMA_PAGE_MIGRATE,
47 #endif
48 #ifdef CONFIG_MIGRATION
49 		PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
50 #endif
51 #ifdef CONFIG_COMPACTION
52 		COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
53 		COMPACTISOLATED,
54 		COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
55 #endif
56 #ifdef CONFIG_HUGETLB_PAGE
57 		HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
58 #endif
59 		UNEVICTABLE_PGCULLED,	/* culled to noreclaim list */
60 		UNEVICTABLE_PGSCANNED,	/* scanned for reclaimability */
61 		UNEVICTABLE_PGRESCUED,	/* rescued from noreclaim list */
62 		UNEVICTABLE_PGMLOCKED,
63 		UNEVICTABLE_PGMUNLOCKED,
64 		UNEVICTABLE_PGCLEARED,	/* on COW, page truncate */
65 		UNEVICTABLE_PGSTRANDED,	/* unable to isolate on unlock */
66 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
67 		THP_FAULT_ALLOC,
68 		THP_FAULT_FALLBACK,
69 		THP_COLLAPSE_ALLOC,
70 		THP_COLLAPSE_ALLOC_FAILED,
71 		THP_SPLIT,
72 		THP_ZERO_PAGE_ALLOC,
73 		THP_ZERO_PAGE_ALLOC_FAILED,
74 #endif
75 #ifdef CONFIG_MEMORY_BALLOON
76 		BALLOON_INFLATE,
77 		BALLOON_DEFLATE,
78 #ifdef CONFIG_BALLOON_COMPACTION
79 		BALLOON_MIGRATE,
80 #endif
81 #endif
82 #ifdef CONFIG_DEBUG_TLBFLUSH
83 #ifdef CONFIG_SMP
84 		NR_TLB_REMOTE_FLUSH,	/* cpu tried to flush others' tlbs */
85 		NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
86 #endif /* CONFIG_SMP */
87 		NR_TLB_LOCAL_FLUSH_ALL,
88 		NR_TLB_LOCAL_FLUSH_ONE,
89 #endif /* CONFIG_DEBUG_TLBFLUSH */
90 #ifdef CONFIG_DEBUG_VM_VMACACHE
91 		VMACACHE_FIND_CALLS,
92 		VMACACHE_FIND_HITS,
93 		VMACACHE_FULL_FLUSHES,
94 #endif
95 		NR_VM_EVENT_ITEMS
96 };
97 
98 #endif		/* VM_EVENT_ITEM_H_INCLUDED */
99