blob: 4d6ec58a8d45b04aa6bae51585e49d44319dd155 [file] [log] [blame]
Andrew Mortonf042e702011-05-26 16:25:24 -07001#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
yalin wangf7ae3a92015-11-05 18:48:50 -080017#define HIGHMEM_ZONE(xx) xx##_HIGH,
Andrew Mortonf042e702011-05-26 16:25:24 -070018#else
19#define HIGHMEM_ZONE(xx)
20#endif
21
yalin wangf7ae3a92015-11-05 18:48:50 -080022#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
Andrew Mortonf042e702011-05-26 16:25:24 -070023
24enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
25 FOR_ALL_ZONES(PGALLOC),
Mel Gorman7cc30fc2016-07-28 15:46:59 -070026 FOR_ALL_ZONES(ALLOCSTALL),
27 FOR_ALL_ZONES(PGSCAN_SKIP),
Andrew Mortonf042e702011-05-26 16:25:24 -070028 PGFREE, PGACTIVATE, PGDEACTIVATE,
29 PGFAULT, PGMAJFAULT,
Minchan Kim854e9ed2016-01-15 16:54:53 -080030 PGLAZYFREED,
Mel Gorman599d0c92016-07-28 15:45:31 -070031 PGREFILL,
32 PGSTEAL_KSWAPD,
33 PGSTEAL_DIRECT,
34 PGSCAN_KSWAPD,
35 PGSCAN_DIRECT,
Mel Gorman68243e72012-07-31 16:44:39 -070036 PGSCAN_DIRECT_THROTTLE,
Andrew Mortonf042e702011-05-26 16:25:24 -070037#ifdef CONFIG_NUMA
38 PGSCAN_ZONE_RECLAIM_FAILED,
39#endif
Ying Han904249a2012-04-25 16:01:48 -070040 PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
Andrew Mortonf042e702011-05-26 16:25:24 -070041 KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
Mel Gorman7cc30fc2016-07-28 15:46:59 -070042 PAGEOUTRUN, PGROTATED,
Dave Hansen5509a5d2014-04-03 14:48:19 -070043 DROP_PAGECACHE, DROP_SLAB,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000044#ifdef CONFIG_NUMA_BALANCING
45 NUMA_PTE_UPDATES,
Mel Gorman72403b42013-11-12 15:08:32 -080046 NUMA_HUGE_PTE_UPDATES,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000047 NUMA_HINT_FAULTS,
48 NUMA_HINT_FAULTS_LOCAL,
49 NUMA_PAGE_MIGRATE,
50#endif
Mel Gorman5647bc22012-10-19 10:46:20 +010051#ifdef CONFIG_MIGRATION
52 PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
53#endif
Andrew Mortonf042e702011-05-26 16:25:24 -070054#ifdef CONFIG_COMPACTION
Mel Gorman397487d2012-10-19 12:00:10 +010055 COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
56 COMPACTISOLATED,
Andrew Mortonf042e702011-05-26 16:25:24 -070057 COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
Vlastimil Babka698b1b32016-03-17 14:18:08 -070058 KCOMPACTD_WAKE,
Andrew Mortonf042e702011-05-26 16:25:24 -070059#endif
60#ifdef CONFIG_HUGETLB_PAGE
61 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
62#endif
63 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */
64 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */
65 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */
66 UNEVICTABLE_PGMLOCKED,
67 UNEVICTABLE_PGMUNLOCKED,
68 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
69 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
Andrew Mortonf042e702011-05-26 16:25:24 -070070#ifdef CONFIG_TRANSPARENT_HUGEPAGE
71 THP_FAULT_ALLOC,
72 THP_FAULT_FALLBACK,
73 THP_COLLAPSE_ALLOC,
74 THP_COLLAPSE_ALLOC_FAILED,
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -070075 THP_FILE_ALLOC,
76 THP_FILE_MAPPED,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080077 THP_SPLIT_PAGE,
78 THP_SPLIT_PAGE_FAILED,
Kirill A. Shutemovf9719a02016-03-17 14:18:45 -070079 THP_DEFERRED_SPLIT_PAGE,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080080 THP_SPLIT_PMD,
Kirill A. Shutemovd8a8e1f2012-12-12 13:51:09 -080081 THP_ZERO_PAGE_ALLOC,
82 THP_ZERO_PAGE_ALLOC_FAILED,
Andrew Mortonf042e702011-05-26 16:25:24 -070083#endif
Konstantin Khlebnikov09316c02014-10-09 15:29:32 -070084#ifdef CONFIG_MEMORY_BALLOON
85 BALLOON_INFLATE,
86 BALLOON_DEFLATE,
87#ifdef CONFIG_BALLOON_COMPACTION
88 BALLOON_MIGRATE,
89#endif
90#endif
Mel Gormanec659932014-01-21 14:33:16 -080091#ifdef CONFIG_DEBUG_TLBFLUSH
Dave Hansen6df46862013-09-11 14:20:24 -070092#ifdef CONFIG_SMP
Dave Hansen9824cf92013-09-11 14:20:23 -070093 NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */
94 NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
Mel Gormanec659932014-01-21 14:33:16 -080095#endif /* CONFIG_SMP */
Dave Hansen9824cf92013-09-11 14:20:23 -070096 NR_TLB_LOCAL_FLUSH_ALL,
97 NR_TLB_LOCAL_FLUSH_ONE,
Mel Gormanec659932014-01-21 14:33:16 -080098#endif /* CONFIG_DEBUG_TLBFLUSH */
Davidlohr Bueso4f115142014-06-04 16:06:46 -070099#ifdef CONFIG_DEBUG_VM_VMACACHE
100 VMACACHE_FIND_CALLS,
101 VMACACHE_FIND_HITS,
Davidlohr Buesof5f302e2014-12-12 16:56:10 -0800102 VMACACHE_FULL_FLUSHES,
Davidlohr Bueso4f115142014-06-04 16:06:46 -0700103#endif
Andrew Mortonf042e702011-05-26 16:25:24 -0700104 NR_VM_EVENT_ITEMS
105};
106
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -0700107#ifndef CONFIG_TRANSPARENT_HUGEPAGE
108#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
109#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
110#endif
111
Andrew Mortonf042e702011-05-26 16:25:24 -0700112#endif /* VM_EVENT_ITEM_H_INCLUDED */