mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 12:07:12 +07:00
7cc30fcfd2
The vmstat allocstall was fairly useful in the general sense but node-based LRUs change that. It's important to know if a stall was for an address-limited allocation request as this will require skipping pages from other zones. This patch adds pgstall_* counters to replace allocstall. The sum of the counters will equal the old allocstall so it can be trivially recalculated. A high number of address-limited allocation requests may result in a lot of useless LRU scanning for suitable pages. As address-limited allocations require pages to be skipped, it's important to know how much useless LRU scanning took place so this patch adds pgskip* counters. This yields the following model 1. The number of address-space limited stalls can be accounted for (pgstall) 2. The amount of useless work required to reclaim the data is accounted (pgskip) 3. The total number of scans is available from pgscan_kswapd and pgscan_direct so from that the ratio of useful to useless scans can be calculated. [mgorman@techsingularity.net: s/pgstall/allocstall/] Link: http://lkml.kernel.org/r/1468404004-5085-3-git-send-email-mgorman@techsingularity.netLink: http://lkml.kernel.org/r/1467970510-21195-33-git-send-email-mgorman@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Rik van Riel <riel@surriel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
113 lines
2.8 KiB
C
113 lines
2.8 KiB
C
#ifndef VM_EVENT_ITEM_H_INCLUDED
|
|
#define VM_EVENT_ITEM_H_INCLUDED
|
|
|
|
#ifdef CONFIG_ZONE_DMA
|
|
#define DMA_ZONE(xx) xx##_DMA,
|
|
#else
|
|
#define DMA_ZONE(xx)
|
|
#endif
|
|
|
|
#ifdef CONFIG_ZONE_DMA32
|
|
#define DMA32_ZONE(xx) xx##_DMA32,
|
|
#else
|
|
#define DMA32_ZONE(xx)
|
|
#endif
|
|
|
|
#ifdef CONFIG_HIGHMEM
|
|
#define HIGHMEM_ZONE(xx) xx##_HIGH,
|
|
#else
|
|
#define HIGHMEM_ZONE(xx)
|
|
#endif
|
|
|
|
#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL, HIGHMEM_ZONE(xx) xx##_MOVABLE
|
|
|
|
enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
|
FOR_ALL_ZONES(PGALLOC),
|
|
FOR_ALL_ZONES(ALLOCSTALL),
|
|
FOR_ALL_ZONES(PGSCAN_SKIP),
|
|
PGFREE, PGACTIVATE, PGDEACTIVATE,
|
|
PGFAULT, PGMAJFAULT,
|
|
PGLAZYFREED,
|
|
PGREFILL,
|
|
PGSTEAL_KSWAPD,
|
|
PGSTEAL_DIRECT,
|
|
PGSCAN_KSWAPD,
|
|
PGSCAN_DIRECT,
|
|
PGSCAN_DIRECT_THROTTLE,
|
|
#ifdef CONFIG_NUMA
|
|
PGSCAN_ZONE_RECLAIM_FAILED,
|
|
#endif
|
|
PGINODESTEAL, SLABS_SCANNED, KSWAPD_INODESTEAL,
|
|
KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY,
|
|
PAGEOUTRUN, PGROTATED,
|
|
DROP_PAGECACHE, DROP_SLAB,
|
|
#ifdef CONFIG_NUMA_BALANCING
|
|
NUMA_PTE_UPDATES,
|
|
NUMA_HUGE_PTE_UPDATES,
|
|
NUMA_HINT_FAULTS,
|
|
NUMA_HINT_FAULTS_LOCAL,
|
|
NUMA_PAGE_MIGRATE,
|
|
#endif
|
|
#ifdef CONFIG_MIGRATION
|
|
PGMIGRATE_SUCCESS, PGMIGRATE_FAIL,
|
|
#endif
|
|
#ifdef CONFIG_COMPACTION
|
|
COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED,
|
|
COMPACTISOLATED,
|
|
COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS,
|
|
KCOMPACTD_WAKE,
|
|
#endif
|
|
#ifdef CONFIG_HUGETLB_PAGE
|
|
HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL,
|
|
#endif
|
|
UNEVICTABLE_PGCULLED, /* culled to noreclaim list */
|
|
UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */
|
|
UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */
|
|
UNEVICTABLE_PGMLOCKED,
|
|
UNEVICTABLE_PGMUNLOCKED,
|
|
UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
|
|
UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
|
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
|
THP_FAULT_ALLOC,
|
|
THP_FAULT_FALLBACK,
|
|
THP_COLLAPSE_ALLOC,
|
|
THP_COLLAPSE_ALLOC_FAILED,
|
|
THP_FILE_ALLOC,
|
|
THP_FILE_MAPPED,
|
|
THP_SPLIT_PAGE,
|
|
THP_SPLIT_PAGE_FAILED,
|
|
THP_DEFERRED_SPLIT_PAGE,
|
|
THP_SPLIT_PMD,
|
|
THP_ZERO_PAGE_ALLOC,
|
|
THP_ZERO_PAGE_ALLOC_FAILED,
|
|
#endif
|
|
#ifdef CONFIG_MEMORY_BALLOON
|
|
BALLOON_INFLATE,
|
|
BALLOON_DEFLATE,
|
|
#ifdef CONFIG_BALLOON_COMPACTION
|
|
BALLOON_MIGRATE,
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_DEBUG_TLBFLUSH
|
|
#ifdef CONFIG_SMP
|
|
NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */
|
|
NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */
|
|
#endif /* CONFIG_SMP */
|
|
NR_TLB_LOCAL_FLUSH_ALL,
|
|
NR_TLB_LOCAL_FLUSH_ONE,
|
|
#endif /* CONFIG_DEBUG_TLBFLUSH */
|
|
#ifdef CONFIG_DEBUG_VM_VMACACHE
|
|
VMACACHE_FIND_CALLS,
|
|
VMACACHE_FIND_HITS,
|
|
VMACACHE_FULL_FLUSHES,
|
|
#endif
|
|
NR_VM_EVENT_ITEMS
|
|
};
|
|
|
|
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
|
|
#define THP_FILE_ALLOC ({ BUILD_BUG(); 0; })
|
|
#define THP_FILE_MAPPED ({ BUILD_BUG(); 0; })
|
|
#endif
|
|
|
|
#endif /* VM_EVENT_ITEM_H_INCLUDED */
|