blob: 5c7f010676a74206e06282337ca77b578058f2f1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Andrew Mortonf042e702011-05-26 16:25:24 -07002#ifndef VM_EVENT_ITEM_H_INCLUDED
3#define VM_EVENT_ITEM_H_INCLUDED
4
5#ifdef CONFIG_ZONE_DMA
6#define DMA_ZONE(xx) xx##_DMA,
7#else
8#define DMA_ZONE(xx)
9#endif
10
11#ifdef CONFIG_ZONE_DMA32
12#define DMA32_ZONE(xx) xx##_DMA32,
13#else
14#define DMA32_ZONE(xx)
15#endif
16
17#ifdef CONFIG_HIGHMEM
yalin wangf7ae3a92015-11-05 18:48:50 -080018#define HIGHMEM_ZONE(xx) xx##_HIGH,
Andrew Mortonf042e702011-05-26 16:25:24 -070019#else
20#define HIGHMEM_ZONE(xx)
21#endif
22
yalin wangf7ae3a92015-11-05 18:48:50 -080023#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 -070024
25enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
26 FOR_ALL_ZONES(PGALLOC),
Mel Gorman7cc30fc2016-07-28 15:46:59 -070027 FOR_ALL_ZONES(ALLOCSTALL),
28 FOR_ALL_ZONES(PGSCAN_SKIP),
Shaohua Lif7ad2a62017-05-03 14:52:29 -070029 PGFREE, PGACTIVATE, PGDEACTIVATE, PGLAZYFREE,
Andrew Mortonf042e702011-05-26 16:25:24 -070030 PGFAULT, PGMAJFAULT,
Minchan Kim854e9ed2016-01-15 16:54:53 -080031 PGLAZYFREED,
Mel Gorman599d0c92016-07-28 15:45:31 -070032 PGREFILL,
33 PGSTEAL_KSWAPD,
34 PGSTEAL_DIRECT,
35 PGSCAN_KSWAPD,
36 PGSCAN_DIRECT,
Mel Gorman68243e72012-07-31 16:44:39 -070037 PGSCAN_DIRECT_THROTTLE,
Andrew Mortonf042e702011-05-26 16:25:24 -070038#ifdef CONFIG_NUMA
39 PGSCAN_ZONE_RECLAIM_FAILED,
40#endif
Ying Han904249a2012-04-25 16:01:48 -070041 PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
Andrew Mortonf042e702011-05-26 16:25:24 -070042 KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
Mel Gorman7cc30fc2016-07-28 15:46:59 -070043 PAGEOUTRUN, PGROTATED,
Dave Hansen5509a5d2014-04-03 14:48:19 -070044 DROP_PAGECACHE, DROP_SLAB,
Konstantin Khlebnikov8e675f72017-07-06 15:40:28 -070045 OOM_KILL,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000046#ifdef CONFIG_NUMA_BALANCING
47 NUMA_PTE_UPDATES,
Mel Gorman72403b42013-11-12 15:08:32 -080048 NUMA_HUGE_PTE_UPDATES,
Mel Gorman03c5a6e2012-11-02 14:52:48 +000049 NUMA_HINT_FAULTS,
50 NUMA_HINT_FAULTS_LOCAL,
51 NUMA_PAGE_MIGRATE,
52#endif
Mel Gorman5647bc22012-10-19 10:46:20 +010053#ifdef CONFIG_MIGRATION
54 PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
55#endif
Andrew Mortonf042e702011-05-26 16:25:24 -070056#ifdef CONFIG_COMPACTION
Mel Gorman397487d2012-10-19 12:00:10 +010057 COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
58 COMPACTISOLATED,
Andrew Mortonf042e702011-05-26 16:25:24 -070059 COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
Vlastimil Babka698b1b32016-03-17 14:18:08 -070060 KCOMPACTD_WAKE,
David Rientjes7f354a52017-02-22 15:44:50 -080061 KCOMPACTD_MIGRATE_SCANNED, KCOMPACTD_FREE_SCANNED,
Andrew Mortonf042e702011-05-26 16:25:24 -070062#endif
63#ifdef CONFIG_HUGETLB_PAGE
64 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
65#endif
66 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */
67 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */
68 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */
69 UNEVICTABLE_PGMLOCKED,
70 UNEVICTABLE_PGMUNLOCKED,
71 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
72 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
Andrew Mortonf042e702011-05-26 16:25:24 -070073#ifdef CONFIG_TRANSPARENT_HUGEPAGE
74 THP_FAULT_ALLOC,
75 THP_FAULT_FALLBACK,
76 THP_COLLAPSE_ALLOC,
77 THP_COLLAPSE_ALLOC_FAILED,
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -070078 THP_FILE_ALLOC,
79 THP_FILE_MAPPED,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080080 THP_SPLIT_PAGE,
81 THP_SPLIT_PAGE_FAILED,
Kirill A. Shutemovf9719a02016-03-17 14:18:45 -070082 THP_DEFERRED_SPLIT_PAGE,
Kirill A. Shutemov122afea2016-01-15 16:52:46 -080083 THP_SPLIT_PMD,
Yisheng Xiece9311c2017-03-09 16:17:00 -080084#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
85 THP_SPLIT_PUD,
86#endif
Kirill A. Shutemovd8a8e1f2012-12-12 13:51:09 -080087 THP_ZERO_PAGE_ALLOC,
88 THP_ZERO_PAGE_ALLOC_FAILED,
Huang Ying225311a2017-09-06 16:22:30 -070089 THP_SWPOUT,
Huang Yingfe490cc2017-09-06 16:22:52 -070090 THP_SWPOUT_FALLBACK,
Andrew Mortonf042e702011-05-26 16:25:24 -070091#endif
Konstantin Khlebnikov09316c02014-10-09 15:29:32 -070092#ifdef CONFIG_MEMORY_BALLOON
93 BALLOON_INFLATE,
94 BALLOON_DEFLATE,
95#ifdef CONFIG_BALLOON_COMPACTION
96 BALLOON_MIGRATE,
97#endif
98#endif
Mel Gormanec659932014-01-21 14:33:16 -080099#ifdef CONFIG_DEBUG_TLBFLUSH
Dave Hansen9824cf92013-09-11 14:20:23 -0700100 NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */
101 NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
102 NR_TLB_LOCAL_FLUSH_ALL,
103 NR_TLB_LOCAL_FLUSH_ONE,
Mel Gormanec659932014-01-21 14:33:16 -0800104#endif /* CONFIG_DEBUG_TLBFLUSH */
Davidlohr Bueso4f115142014-06-04 16:06:46 -0700105#ifdef CONFIG_DEBUG_VM_VMACACHE
106 VMACACHE_FIND_CALLS,
107 VMACACHE_FIND_HITS,
Davidlohr Buesof5f302e2014-12-12 16:56:10 -0800108 VMACACHE_FULL_FLUSHES,
Davidlohr Bueso4f115142014-06-04 16:06:46 -0700109#endif
Huang Yingcbc65df2017-09-06 16:24:29 -0700110#ifdef CONFIG_SWAP
111 SWAP_RA,
112 SWAP_RA_HIT,
113#endif
Andrew Mortonf042e702011-05-26 16:25:24 -0700114 NR_VM_EVENT_ITEMS
115};
116
Kirill A. Shutemov95ecedc2016-07-26 15:25:31 -0700117#ifndef CONFIG_TRANSPARENT_HUGEPAGE
118#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
119#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
120#endif
121
Andrew Mortonf042e702011-05-26 16:25:24 -0700122#endif /* VM_EVENT_ITEM_H_INCLUDED */