blob: 1798ff542517cac3ea5656d22f8f1cb4556817ac [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),
26 PGFREE, PGACTIVATE, PGDEACTIVATE,
27 PGFAULT, PGMAJFAULT,
Minchan Kim854e9ed2016-01-15 16:54:53 -080028 PGLAZYFREED,
Mel Gorman599d0c92016-07-28 15:45:31 -070029 PGREFILL,
30 PGSTEAL_KSWAPD,
31 PGSTEAL_DIRECT,
32 PGSCAN_KSWAPD,
33 PGSCAN_DIRECT,
Mel Gorman68243e72012-07-31 16:44:39 -070034 PGSCAN_DIRECT_THROTTLE,
Andrew Mortonf042e702011-05-26 16:25:24 -070035#ifdef CONFIG_NUMA
36 PGSCAN_ZONE_RECLAIM_FAILED,
37#endif
Ying Han904249a2012-04-25 16:01:48 -070038 PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
Andrew Mortonf042e702011-05-26 16:25:24 -070039 KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
Andrew Mortonf042e702011-05-26 16:25:24 -070040 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
Dave Hansen5509a5d2014-04-03 14:48:19 -070041 DROP_PAGECACHE, DROP_SLAB,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000042#ifdef CONFIG_NUMA_BALANCING
43 NUMA_PTE_UPDATES,
Mel Gorman72403b42013-11-12 15:08:32 -080044 NUMA_HUGE_PTE_UPDATES,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000045 NUMA_HINT_FAULTS,
46 NUMA_HINT_FAULTS_LOCAL,
47 NUMA_PAGE_MIGRATE,
48#endif
Mel Gorman5647bc22012-10-19 10:46:20 +010049#ifdef CONFIG_MIGRATION
50 PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
51#endif
Andrew Mortonf042e702011-05-26 16:25:24 -070052#ifdef CONFIG_COMPACTION
Mel Gorman397487d2012-10-19 12:00:10 +010053 COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
54 COMPACTISOLATED,
Andrew Mortonf042e702011-05-26 16:25:24 -070055 COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
Vlastimil Babka698b1b32016-03-17 14:18:08 -070056 KCOMPACTD_WAKE,
Andrew Mortonf042e702011-05-26 16:25:24 -070057#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 */
Andrew Mortonf042e702011-05-26 16:25:24 -070068#ifdef CONFIG_TRANSPARENT_HUGEPAGE
69 THP_FAULT_ALLOC,
70 THP_FAULT_FALLBACK,
71 THP_COLLAPSE_ALLOC,
72 THP_COLLAPSE_ALLOC_FAILED,
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -070073 THP_FILE_ALLOC,
74 THP_FILE_MAPPED,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080075 THP_SPLIT_PAGE,
76 THP_SPLIT_PAGE_FAILED,
Kirill A. Shutemovf9719a02016-03-17 14:18:45 -070077 THP_DEFERRED_SPLIT_PAGE,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080078 THP_SPLIT_PMD,
Kirill A. Shutemovd8a8e1f2012-12-12 13:51:09 -080079 THP_ZERO_PAGE_ALLOC,
80 THP_ZERO_PAGE_ALLOC_FAILED,
Andrew Mortonf042e702011-05-26 16:25:24 -070081#endif
Konstantin Khlebnikov09316c02014-10-09 15:29:32 -070082#ifdef CONFIG_MEMORY_BALLOON
83 BALLOON_INFLATE,
84 BALLOON_DEFLATE,
85#ifdef CONFIG_BALLOON_COMPACTION
86 BALLOON_MIGRATE,
87#endif
88#endif
Mel Gormanec659932014-01-21 14:33:16 -080089#ifdef CONFIG_DEBUG_TLBFLUSH
Dave Hansen6df46862013-09-11 14:20:24 -070090#ifdef CONFIG_SMP
Dave Hansen9824cf92013-09-11 14:20:23 -070091 NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */
92 NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
Mel Gormanec659932014-01-21 14:33:16 -080093#endif /* CONFIG_SMP */
Dave Hansen9824cf92013-09-11 14:20:23 -070094 NR_TLB_LOCAL_FLUSH_ALL,
95 NR_TLB_LOCAL_FLUSH_ONE,
Mel Gormanec659932014-01-21 14:33:16 -080096#endif /* CONFIG_DEBUG_TLBFLUSH */
Davidlohr Bueso4f115142014-06-04 16:06:46 -070097#ifdef CONFIG_DEBUG_VM_VMACACHE
98 VMACACHE_FIND_CALLS,
99 VMACACHE_FIND_HITS,
Davidlohr Buesof5f302e2014-12-12 16:56:10 -0800100 VMACACHE_FULL_FLUSHES,
Davidlohr Bueso4f115142014-06-04 16:06:46 -0700101#endif
Andrew Mortonf042e702011-05-26 16:25:24 -0700102 NR_VM_EVENT_ITEMS
103};
104
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -0700105#ifndef CONFIG_TRANSPARENT_HUGEPAGE
106#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
107#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
108#endif
109
Andrew Mortonf042e702011-05-26 16:25:24 -0700110#endif /* VM_EVENT_ITEM_H_INCLUDED */