1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef VM_EVENT_ITEM_H_INCLUDED
3 #define VM_EVENT_ITEM_H_INCLUDED
6 #define DMA_ZONE(xx) xx##_DMA,
11 #ifdef CONFIG_ZONE_DMA32
12 #define DMA32_ZONE(xx) xx##_DMA32,
14 #define DMA32_ZONE(xx)
18 #define HIGHMEM_ZONE(xx) xx##_HIGH,
20 #define HIGHMEM_ZONE(xx)
23 #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
25 enum vm_event_item
{ PGPGIN
, PGPGOUT
, PSWPIN
, PSWPOUT
,
26 FOR_ALL_ZONES(PGALLOC
),
27 FOR_ALL_ZONES(ALLOCSTALL
),
28 FOR_ALL_ZONES(PGSCAN_SKIP
),
29 PGFREE
, PGACTIVATE
, PGDEACTIVATE
, PGLAZYFREE
,
37 PGSCAN_DIRECT_THROTTLE
,
39 PGSCAN_ZONE_RECLAIM_FAILED
,
41 PGINODESTEAL
, SLABS_SCANNED
, KSWAPD_INODESTEAL
,
42 KSWAPD_LOW_WMARK_HIT_QUICKLY
, KSWAPD_HIGH_WMARK_HIT_QUICKLY
,
43 PAGEOUTRUN
, PGROTATED
,
44 DROP_PAGECACHE
, DROP_SLAB
,
46 #ifdef CONFIG_NUMA_BALANCING
48 NUMA_HUGE_PTE_UPDATES
,
50 NUMA_HINT_FAULTS_LOCAL
,
53 #ifdef CONFIG_MIGRATION
54 PGMIGRATE_SUCCESS
, PGMIGRATE_FAIL
,
56 #ifdef CONFIG_COMPACTION
57 COMPACTMIGRATE_SCANNED
, COMPACTFREE_SCANNED
,
59 COMPACTSTALL
, COMPACTFAIL
, COMPACTSUCCESS
,
61 KCOMPACTD_MIGRATE_SCANNED
, KCOMPACTD_FREE_SCANNED
,
63 #ifdef CONFIG_HUGETLB_PAGE
64 HTLB_BUDDY_PGALLOC
, HTLB_BUDDY_PGALLOC_FAIL
,
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 */
73 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
77 THP_COLLAPSE_ALLOC_FAILED
,
81 THP_SPLIT_PAGE_FAILED
,
82 THP_DEFERRED_SPLIT_PAGE
,
84 #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
88 THP_ZERO_PAGE_ALLOC_FAILED
,
92 #ifdef CONFIG_MEMORY_BALLOON
95 #ifdef CONFIG_BALLOON_COMPACTION
99 #ifdef CONFIG_DEBUG_TLBFLUSH
100 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
,
104 #endif /* CONFIG_DEBUG_TLBFLUSH */
105 #ifdef CONFIG_DEBUG_VM_VMACACHE
108 VMACACHE_FULL_FLUSHES
,
117 #ifndef CONFIG_TRANSPARENT_HUGEPAGE
118 #define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
119 #define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
122 #endif /* VM_EVENT_ITEM_H_INCLUDED */