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 17 #define HIGHMEM_ZONE(xx) xx##_HIGH, 18 #else 19 #define HIGHMEM_ZONE(xx) 20 #endif 21 22 #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE 23 24 enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, 25 FOR_ALL_ZONES(PGALLOC), 26 FOR_ALL_ZONES(ALLOCSTALL), 27 FOR_ALL_ZONES(PGSCAN_SKIP), 28 PGFREE, PGACTIVATE, PGDEACTIVATE, PGLAZYFREE, 29 PGFAULT, PGMAJFAULT, 30 PGLAZYFREED, 31 PGREFILL, 32 PGSTEAL_KSWAPD, 33 PGSTEAL_DIRECT, 34 PGSCAN_KSWAPD, 35 PGSCAN_DIRECT, 36 PGSCAN_DIRECT_THROTTLE, 37 #ifdef CONFIG_NUMA 38 PGSCAN_ZONE_RECLAIM_FAILED, 39 #endif 40 PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL, 41 KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, 42 PAGEOUTRUN, PGROTATED, 43 DROP_PAGECACHE, DROP_SLAB, 44 #ifdef CONFIG_NUMA_BALANCING 45 NUMA_PTE_UPDATES, 46 NUMA_HUGE_PTE_UPDATES, 47 NUMA_HINT_FAULTS, 48 NUMA_HINT_FAULTS_LOCAL, 49 NUMA_PAGE_MIGRATE, 50 #endif 51 #ifdef CONFIG_MIGRATION 52 PGMIGRATE_SUCCESS, PGMIGRATE_FAIL, 53 #endif 54 #ifdef CONFIG_COMPACTION 55 COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED, 56 COMPACTISOLATED, 57 COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, 58 KCOMPACTD_WAKE, 59 KCOMPACTD_MIGRATE_SCANNED, KCOMPACTD_FREE_SCANNED, 60 #endif 61 #ifdef CONFIG_HUGETLB_PAGE 62 HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, 63 #endif 64 UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ 65 UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ 66 UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ 67 UNEVICTABLE_PGMLOCKED, 68 UNEVICTABLE_PGMUNLOCKED, 69 UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ 70 UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ 71 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 72 THP_FAULT_ALLOC, 73 THP_FAULT_FALLBACK, 74 THP_COLLAPSE_ALLOC, 75 THP_COLLAPSE_ALLOC_FAILED, 76 THP_FILE_ALLOC, 77 THP_FILE_MAPPED, 78 THP_SPLIT_PAGE, 79 THP_SPLIT_PAGE_FAILED, 80 THP_DEFERRED_SPLIT_PAGE, 81 THP_SPLIT_PMD, 82 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD 83 THP_SPLIT_PUD, 84 #endif 85 THP_ZERO_PAGE_ALLOC, 86 THP_ZERO_PAGE_ALLOC_FAILED, 87 #endif 88 #ifdef CONFIG_MEMORY_BALLOON 89 BALLOON_INFLATE, 90 BALLOON_DEFLATE, 91 #ifdef CONFIG_BALLOON_COMPACTION 92 BALLOON_MIGRATE, 93 #endif 94 #endif 95 #ifdef CONFIG_DEBUG_TLBFLUSH 96 #ifdef CONFIG_SMP 97 NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */ 98 NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */ 99 #endif /* CONFIG_SMP */ 100 NR_TLB_LOCAL_FLUSH_ALL, 101 NR_TLB_LOCAL_FLUSH_ONE, 102 #endif /* CONFIG_DEBUG_TLBFLUSH */ 103 #ifdef CONFIG_DEBUG_VM_VMACACHE 104 VMACACHE_FIND_CALLS, 105 VMACACHE_FIND_HITS, 106 VMACACHE_FULL_FLUSHES, 107 #endif 108 NR_VM_EVENT_ITEMS 109 }; 110 111 #ifndef CONFIG_TRANSPARENT_HUGEPAGE 112 #define THP_FILE_ALLOC ({ BUILD_BUG(); 0; }) 113 #define THP_FILE_MAPPED ({ BUILD_BUG(); 0; }) 114 #endif 115 116 #endif /* VM_EVENT_ITEM_H_INCLUDED */ 117