linux/include/linux/vm_event_item.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#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
  18#define HIGHMEM_ZONE(xx) xx##_HIGH,
  19#else
  20#define HIGHMEM_ZONE(xx)
  21#endif
  22
  23#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
  24
  25enum 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,
  30                PGFAULT, PGMAJFAULT,
  31                PGLAZYFREED,
  32                PGREFILL,
  33                PGSTEAL_KSWAPD,
  34                PGSTEAL_DIRECT,
  35                PGSCAN_KSWAPD,
  36                PGSCAN_DIRECT,
  37                PGSCAN_DIRECT_THROTTLE,
  38#ifdef CONFIG_NUMA
  39                PGSCAN_ZONE_RECLAIM_FAILED,
  40#endif
  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,
  45                OOM_KILL,
  46#ifdef CONFIG_NUMA_BALANCING
  47                NUMA_PTE_UPDATES,
  48                NUMA_HUGE_PTE_UPDATES,
  49                NUMA_HINT_FAULTS,
  50                NUMA_HINT_FAULTS_LOCAL,
  51                NUMA_PAGE_MIGRATE,
  52#endif
  53#ifdef CONFIG_MIGRATION
  54                PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
  55#endif
  56#ifdef CONFIG_COMPACTION
  57                COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
  58                COMPACTISOLATED,
  59                COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
  60                KCOMPACTD_WAKE,
  61                KCOMPACTD_MIGRATE_SCANNED, KCOMPACTD_FREE_SCANNED,
  62#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 */
  73#ifdef CONFIG_TRANSPARENT_HUGEPAGE
  74                THP_FAULT_ALLOC,
  75                THP_FAULT_FALLBACK,
  76                THP_COLLAPSE_ALLOC,
  77                THP_COLLAPSE_ALLOC_FAILED,
  78                THP_FILE_ALLOC,
  79                THP_FILE_MAPPED,
  80                THP_SPLIT_PAGE,
  81                THP_SPLIT_PAGE_FAILED,
  82                THP_DEFERRED_SPLIT_PAGE,
  83                THP_SPLIT_PMD,
  84#ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
  85                THP_SPLIT_PUD,
  86#endif
  87                THP_ZERO_PAGE_ALLOC,
  88                THP_ZERO_PAGE_ALLOC_FAILED,
  89                THP_SWPOUT,
  90                THP_SWPOUT_FALLBACK,
  91#endif
  92#ifdef CONFIG_MEMORY_BALLOON
  93                BALLOON_INFLATE,
  94                BALLOON_DEFLATE,
  95#ifdef CONFIG_BALLOON_COMPACTION
  96                BALLOON_MIGRATE,
  97#endif
  98#endif
  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
 106                VMACACHE_FIND_CALLS,
 107                VMACACHE_FIND_HITS,
 108#endif
 109#ifdef CONFIG_SWAP
 110                SWAP_RA,
 111                SWAP_RA_HIT,
 112#endif
 113                NR_VM_EVENT_ITEMS
 114};
 115
 116#ifndef CONFIG_TRANSPARENT_HUGEPAGE
 117#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
 118#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
 119#endif
 120
 121#endif          /* VM_EVENT_ITEM_H_INCLUDED */
 122