Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 1 | #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 wang | f7ae3a9 | 2015-11-05 18:48:50 -0800 | [diff] [blame] | 17 | #define HIGHMEM_ZONE(xx) xx##_HIGH, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 18 | #else |
| 19 | #define HIGHMEM_ZONE(xx) |
| 20 | #endif |
| 21 | |
yalin wang | f7ae3a9 | 2015-11-05 18:48:50 -0800 | [diff] [blame] | 22 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 23 | |
| 24 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
| 25 | FOR_ALL_ZONES(PGALLOC), |
Mel Gorman | 7cc30fc | 2016-07-28 15:46:59 -0700 | [diff] [blame] | 26 | FOR_ALL_ZONES(ALLOCSTALL), |
| 27 | FOR_ALL_ZONES(PGSCAN_SKIP), |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 28 | PGFREE, PGACTIVATE, PGDEACTIVATE, |
| 29 | PGFAULT, PGMAJFAULT, |
Minchan Kim | 854e9ed | 2016-01-15 16:54:53 -0800 | [diff] [blame] | 30 | PGLAZYFREED, |
Mel Gorman | 599d0c9 | 2016-07-28 15:45:31 -0700 | [diff] [blame] | 31 | PGREFILL, |
| 32 | PGSTEAL_KSWAPD, |
| 33 | PGSTEAL_DIRECT, |
| 34 | PGSCAN_KSWAPD, |
| 35 | PGSCAN_DIRECT, |
Mel Gorman | 68243e7 | 2012-07-31 16:44:39 -0700 | [diff] [blame] | 36 | PGSCAN_DIRECT_THROTTLE, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 37 | #ifdef CONFIG_NUMA |
| 38 | PGSCAN_ZONE_RECLAIM_FAILED, |
| 39 | #endif |
Ying Han | 904249a | 2012-04-25 16:01:48 -0700 | [diff] [blame] | 40 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 41 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, |
Mel Gorman | 7cc30fc | 2016-07-28 15:46:59 -0700 | [diff] [blame] | 42 | PAGEOUTRUN, PGROTATED, |
Dave Hansen | 5509a5d | 2014-04-03 14:48:19 -0700 | [diff] [blame] | 43 | DROP_PAGECACHE, DROP_SLAB, |
Mel Gorman | 03c5a6e | 2012-11-02 14:52:48 +0000 | [diff] [blame] | 44 | #ifdef CONFIG_NUMA_BALANCING |
| 45 | NUMA_PTE_UPDATES, |
Mel Gorman | 72403b4 | 2013-11-12 15:08:32 -0800 | [diff] [blame] | 46 | NUMA_HUGE_PTE_UPDATES, |
Mel Gorman | 03c5a6e | 2012-11-02 14:52:48 +0000 | [diff] [blame] | 47 | NUMA_HINT_FAULTS, |
| 48 | NUMA_HINT_FAULTS_LOCAL, |
| 49 | NUMA_PAGE_MIGRATE, |
| 50 | #endif |
Mel Gorman | 5647bc2 | 2012-10-19 10:46:20 +0100 | [diff] [blame] | 51 | #ifdef CONFIG_MIGRATION |
| 52 | PGMIGRATE_SUCCESS, PGMIGRATE_FAIL, |
| 53 | #endif |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 54 | #ifdef CONFIG_COMPACTION |
Mel Gorman | 397487d | 2012-10-19 12:00:10 +0100 | [diff] [blame] | 55 | COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED, |
| 56 | COMPACTISOLATED, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 57 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, |
Vlastimil Babka | 698b1b3 | 2016-03-17 14:18:08 -0700 | [diff] [blame] | 58 | KCOMPACTD_WAKE, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 59 | #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 Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 70 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
| 71 | THP_FAULT_ALLOC, |
| 72 | THP_FAULT_FALLBACK, |
| 73 | THP_COLLAPSE_ALLOC, |
| 74 | THP_COLLAPSE_ALLOC_FAILED, |
Kirill A. Shutemov | 95ecedc | 2016-07-26 15:25:31 -0700 | [diff] [blame] | 75 | THP_FILE_ALLOC, |
| 76 | THP_FILE_MAPPED, |
Kirill A. Shutemov | 122afea | 2016-01-15 16:52:46 -0800 | [diff] [blame] | 77 | THP_SPLIT_PAGE, |
| 78 | THP_SPLIT_PAGE_FAILED, |
Kirill A. Shutemov | f9719a0 | 2016-03-17 14:18:45 -0700 | [diff] [blame] | 79 | THP_DEFERRED_SPLIT_PAGE, |
Kirill A. Shutemov | 122afea | 2016-01-15 16:52:46 -0800 | [diff] [blame] | 80 | THP_SPLIT_PMD, |
Kirill A. Shutemov | d8a8e1f | 2012-12-12 13:51:09 -0800 | [diff] [blame] | 81 | THP_ZERO_PAGE_ALLOC, |
| 82 | THP_ZERO_PAGE_ALLOC_FAILED, |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 83 | #endif |
Konstantin Khlebnikov | 09316c0 | 2014-10-09 15:29:32 -0700 | [diff] [blame] | 84 | #ifdef CONFIG_MEMORY_BALLOON |
| 85 | BALLOON_INFLATE, |
| 86 | BALLOON_DEFLATE, |
| 87 | #ifdef CONFIG_BALLOON_COMPACTION |
| 88 | BALLOON_MIGRATE, |
| 89 | #endif |
| 90 | #endif |
Mel Gorman | ec65993 | 2014-01-21 14:33:16 -0800 | [diff] [blame] | 91 | #ifdef CONFIG_DEBUG_TLBFLUSH |
Dave Hansen | 6df4686 | 2013-09-11 14:20:24 -0700 | [diff] [blame] | 92 | #ifdef CONFIG_SMP |
Dave Hansen | 9824cf9 | 2013-09-11 14:20:23 -0700 | [diff] [blame] | 93 | NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */ |
| 94 | NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */ |
Mel Gorman | ec65993 | 2014-01-21 14:33:16 -0800 | [diff] [blame] | 95 | #endif /* CONFIG_SMP */ |
Dave Hansen | 9824cf9 | 2013-09-11 14:20:23 -0700 | [diff] [blame] | 96 | NR_TLB_LOCAL_FLUSH_ALL, |
| 97 | NR_TLB_LOCAL_FLUSH_ONE, |
Mel Gorman | ec65993 | 2014-01-21 14:33:16 -0800 | [diff] [blame] | 98 | #endif /* CONFIG_DEBUG_TLBFLUSH */ |
Davidlohr Bueso | 4f11514 | 2014-06-04 16:06:46 -0700 | [diff] [blame] | 99 | #ifdef CONFIG_DEBUG_VM_VMACACHE |
| 100 | VMACACHE_FIND_CALLS, |
| 101 | VMACACHE_FIND_HITS, |
Davidlohr Bueso | f5f302e | 2014-12-12 16:56:10 -0800 | [diff] [blame] | 102 | VMACACHE_FULL_FLUSHES, |
Davidlohr Bueso | 4f11514 | 2014-06-04 16:06:46 -0700 | [diff] [blame] | 103 | #endif |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 104 | NR_VM_EVENT_ITEMS |
| 105 | }; |
| 106 | |
Kirill A. Shutemov | 95ecedc | 2016-07-26 15:25:31 -0700 | [diff] [blame] | 107 | #ifndef CONFIG_TRANSPARENT_HUGEPAGE |
| 108 | #define THP_FILE_ALLOC ({ BUILD_BUG(); 0; }) |
| 109 | #define THP_FILE_MAPPED ({ BUILD_BUG(); 0; }) |
| 110 | #endif |
| 111 | |
Andrew Morton | f042e70 | 2011-05-26 16:25:24 -0700 | [diff] [blame] | 112 | #endif /* VM_EVENT_ITEM_H_INCLUDED */ |