vm_event_item.h 2.81 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef VM_EVENT_ITEM_H_INCLUDED
#define VM_EVENT_ITEM_H_INCLUDED

#ifdef CONFIG_ZONE_DMA
#define DMA_ZONE(xx) xx##_DMA,
#else
#define DMA_ZONE(xx)
#endif

#ifdef CONFIG_ZONE_DMA32
#define DMA32_ZONE(xx) xx##_DMA32,
#else
#define DMA32_ZONE(xx)
#endif

#ifdef CONFIG_HIGHMEM
17
#define HIGHMEM_ZONE(xx) xx##_HIGH,
18 19 20 21
#else
#define HIGHMEM_ZONE(xx)
#endif

22
#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
23 24 25

enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
		FOR_ALL_ZONES(PGALLOC),
26 27
		FOR_ALL_ZONES(ALLOCSTALL),
		FOR_ALL_ZONES(PGSCAN_SKIP),
28 29
		PGFREE, PGACTIVATE, PGDEACTIVATE,
		PGFAULT, PGMAJFAULT,
Minchan Kim's avatar
Minchan Kim committed
30
		PGLAZYFREED,
31 32 33 34 35
		PGREFILL,
		PGSTEAL_KSWAPD,
		PGSTEAL_DIRECT,
		PGSCAN_KSWAPD,
		PGSCAN_DIRECT,
36
		PGSCAN_DIRECT_THROTTLE,
37 38 39
#ifdef CONFIG_NUMA
		PGSCAN_ZONE_RECLAIM_FAILED,
#endif
40
		PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
41
		KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
42
		PAGEOUTRUN, PGROTATED,
43
		DROP_PAGECACHE, DROP_SLAB,
44 45
#ifdef CONFIG_NUMA_BALANCING
		NUMA_PTE_UPDATES,
46
		NUMA_HUGE_PTE_UPDATES,
47 48 49 50
		NUMA_HINT_FAULTS,
		NUMA_HINT_FAULTS_LOCAL,
		NUMA_PAGE_MIGRATE,
#endif
51 52 53
#ifdef CONFIG_MIGRATION
		PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
#endif
54
#ifdef CONFIG_COMPACTION
55 56
		COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
		COMPACTISOLATED,
57
		COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
58
		KCOMPACTD_WAKE,
59
		KCOMPACTD_MIGRATE_SCANNED, KCOMPACTD_FREE_SCANNED,
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
#endif
#ifdef CONFIG_HUGETLB_PAGE
		HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
#endif
		UNEVICTABLE_PGCULLED,	/* culled to noreclaim list */
		UNEVICTABLE_PGSCANNED,	/* scanned for reclaimability */
		UNEVICTABLE_PGRESCUED,	/* rescued from noreclaim list */
		UNEVICTABLE_PGMLOCKED,
		UNEVICTABLE_PGMUNLOCKED,
		UNEVICTABLE_PGCLEARED,	/* on COW, page truncate */
		UNEVICTABLE_PGSTRANDED,	/* unable to isolate on unlock */
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
		THP_FAULT_ALLOC,
		THP_FAULT_FALLBACK,
		THP_COLLAPSE_ALLOC,
		THP_COLLAPSE_ALLOC_FAILED,
76 77
		THP_FILE_ALLOC,
		THP_FILE_MAPPED,
78 79
		THP_SPLIT_PAGE,
		THP_SPLIT_PAGE_FAILED,
80
		THP_DEFERRED_SPLIT_PAGE,
81
		THP_SPLIT_PMD,
82 83
		THP_ZERO_PAGE_ALLOC,
		THP_ZERO_PAGE_ALLOC_FAILED,
84
#endif
85 86 87 88 89 90 91
#ifdef CONFIG_MEMORY_BALLOON
		BALLOON_INFLATE,
		BALLOON_DEFLATE,
#ifdef CONFIG_BALLOON_COMPACTION
		BALLOON_MIGRATE,
#endif
#endif
92
#ifdef CONFIG_DEBUG_TLBFLUSH
93
#ifdef CONFIG_SMP
Dave Hansen's avatar
Dave Hansen committed
94 95
		NR_TLB_REMOTE_FLUSH,	/* cpu tried to flush others' tlbs */
		NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
96
#endif /* CONFIG_SMP */
Dave Hansen's avatar
Dave Hansen committed
97 98
		NR_TLB_LOCAL_FLUSH_ALL,
		NR_TLB_LOCAL_FLUSH_ONE,
99
#endif /* CONFIG_DEBUG_TLBFLUSH */
Davidlohr Bueso's avatar
Davidlohr Bueso committed
100 101 102
#ifdef CONFIG_DEBUG_VM_VMACACHE
		VMACACHE_FIND_CALLS,
		VMACACHE_FIND_HITS,
103
		VMACACHE_FULL_FLUSHES,
Davidlohr Bueso's avatar
Davidlohr Bueso committed
104
#endif
105 106 107
		NR_VM_EVENT_ITEMS
};

108 109 110 111 112
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
#endif

113
#endif		/* VM_EVENT_ITEM_H_INCLUDED */