blob: e623d392db0c16c4cfc21102bfb3d63158d14326 [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,
28 FOR_ALL_ZONES(PGREFILL),
Ying Han904249a2012-04-25 16:01:48 -070029 FOR_ALL_ZONES(PGSTEAL_KSWAPD),
30 FOR_ALL_ZONES(PGSTEAL_DIRECT),
Andrew Mortonf042e702011-05-26 16:25:24 -070031 FOR_ALL_ZONES(PGSCAN_KSWAPD),
32 FOR_ALL_ZONES(PGSCAN_DIRECT),
Mel Gorman68243e72012-07-31 16:44:39 -070033 PGSCAN_DIRECT_THROTTLE,
Andrew Mortonf042e702011-05-26 16:25:24 -070034#ifdef CONFIG_NUMA
35 PGSCAN_ZONE_RECLAIM_FAILED,
36#endif
Ying Han904249a2012-04-25 16:01:48 -070037 PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
Andrew Mortonf042e702011-05-26 16:25:24 -070038 KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
Andrew Mortonf042e702011-05-26 16:25:24 -070039 PAGEOUTRUN, ALLOCSTALL, PGROTATED,
Dave Hansen5509a5d2014-04-03 14:48:19 -070040 DROP_PAGECACHE, DROP_SLAB,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000041#ifdef CONFIG_NUMA_BALANCING
42 NUMA_PTE_UPDATES,
Mel Gorman72403b42013-11-12 15:08:32 -080043 NUMA_HUGE_PTE_UPDATES,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000044 NUMA_HINT_FAULTS,
45 NUMA_HINT_FAULTS_LOCAL,
46 NUMA_PAGE_MIGRATE,
47#endif
Mel Gorman5647bc22012-10-19 10:46:20 +010048#ifdef CONFIG_MIGRATION
49 PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
50#endif
Andrew Mortonf042e702011-05-26 16:25:24 -070051#ifdef CONFIG_COMPACTION
Mel Gorman397487d2012-10-19 12:00:10 +010052 COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
53 COMPACTISOLATED,
Andrew Mortonf042e702011-05-26 16:25:24 -070054 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 */
Andrew Mortonf042e702011-05-26 16:25:24 -070066#ifdef CONFIG_TRANSPARENT_HUGEPAGE
67 THP_FAULT_ALLOC,
68 THP_FAULT_FALLBACK,
69 THP_COLLAPSE_ALLOC,
70 THP_COLLAPSE_ALLOC_FAILED,
71 THP_SPLIT,
Kirill A. Shutemovd8a8e1f2012-12-12 13:51:09 -080072 THP_ZERO_PAGE_ALLOC,
73 THP_ZERO_PAGE_ALLOC_FAILED,
Andrew Mortonf042e702011-05-26 16:25:24 -070074#endif
Konstantin Khlebnikov09316c02014-10-09 15:29:32 -070075#ifdef CONFIG_MEMORY_BALLOON
76 BALLOON_INFLATE,
77 BALLOON_DEFLATE,
78#ifdef CONFIG_BALLOON_COMPACTION
79 BALLOON_MIGRATE,
80#endif
81#endif
Mel Gormanec659932014-01-21 14:33:16 -080082#ifdef CONFIG_DEBUG_TLBFLUSH
Dave Hansen6df46862013-09-11 14:20:24 -070083#ifdef CONFIG_SMP
Dave Hansen9824cf92013-09-11 14:20:23 -070084 NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */
85 NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
Mel Gormanec659932014-01-21 14:33:16 -080086#endif /* CONFIG_SMP */
Dave Hansen9824cf92013-09-11 14:20:23 -070087 NR_TLB_LOCAL_FLUSH_ALL,
88 NR_TLB_LOCAL_FLUSH_ONE,
Mel Gormanec659932014-01-21 14:33:16 -080089#endif /* CONFIG_DEBUG_TLBFLUSH */
Davidlohr Bueso4f115142014-06-04 16:06:46 -070090#ifdef CONFIG_DEBUG_VM_VMACACHE
91 VMACACHE_FIND_CALLS,
92 VMACACHE_FIND_HITS,
Davidlohr Buesof5f302e2014-12-12 16:56:10 -080093 VMACACHE_FULL_FLUSHES,
Davidlohr Bueso4f115142014-06-04 16:06:46 -070094#endif
Andrew Mortonf042e702011-05-26 16:25:24 -070095 NR_VM_EVENT_ITEMS
96};
97
98#endif /* VM_EVENT_ITEM_H_INCLUDED */