diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vm_event_item.h | 64 | ||||
-rw-r--r-- | include/linux/vmstat.h | 62 |
2 files changed, 65 insertions, 61 deletions
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h new file mode 100644 index 000000000000..03b90cdc1921 --- /dev/null +++ b/include/linux/vm_event_item.h | |||
@@ -0,0 +1,64 @@ | |||
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 | PGFREE, PGACTIVATE, PGDEACTIVATE, | ||
27 | PGFAULT, PGMAJFAULT, | ||
28 | FOR_ALL_ZONES(PGREFILL), | ||
29 | FOR_ALL_ZONES(PGSTEAL), | ||
30 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | ||
31 | FOR_ALL_ZONES(PGSCAN_DIRECT), | ||
32 | #ifdef CONFIG_NUMA | ||
33 | PGSCAN_ZONE_RECLAIM_FAILED, | ||
34 | #endif | ||
35 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, | ||
36 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, | ||
37 | KSWAPD_SKIP_CONGESTION_WAIT, | ||
38 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | ||
39 | #ifdef CONFIG_COMPACTION | ||
40 | COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED, | ||
41 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, | ||
42 | #endif | ||
43 | #ifdef CONFIG_HUGETLB_PAGE | ||
44 | HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, | ||
45 | #endif | ||
46 | UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ | ||
47 | UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ | ||
48 | UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ | ||
49 | UNEVICTABLE_PGMLOCKED, | ||
50 | UNEVICTABLE_PGMUNLOCKED, | ||
51 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | ||
52 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | ||
53 | UNEVICTABLE_MLOCKFREED, | ||
54 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
55 | THP_FAULT_ALLOC, | ||
56 | THP_FAULT_FALLBACK, | ||
57 | THP_COLLAPSE_ALLOC, | ||
58 | THP_COLLAPSE_ALLOC_FAILED, | ||
59 | THP_SPLIT, | ||
60 | #endif | ||
61 | NR_VM_EVENT_ITEMS | ||
62 | }; | ||
63 | |||
64 | #endif /* VM_EVENT_ITEM_H_INCLUDED */ | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 51359837511a..bcd942fa611c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -5,69 +5,9 @@ | |||
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
8 | #include <linux/vm_event_item.h> | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
10 | #ifdef CONFIG_ZONE_DMA | ||
11 | #define DMA_ZONE(xx) xx##_DMA, | ||
12 | #else | ||
13 | #define DMA_ZONE(xx) | ||
14 | #endif | ||
15 | |||
16 | #ifdef CONFIG_ZONE_DMA32 | ||
17 | #define DMA32_ZONE(xx) xx##_DMA32, | ||
18 | #else | ||
19 | #define DMA32_ZONE(xx) | ||
20 | #endif | ||
21 | |||
22 | #ifdef CONFIG_HIGHMEM | ||
23 | #define HIGHMEM_ZONE(xx) , xx##_HIGH | ||
24 | #else | ||
25 | #define HIGHMEM_ZONE(xx) | ||
26 | #endif | ||
27 | |||
28 | |||
29 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) , xx##_MOVABLE | ||
30 | |||
31 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | ||
32 | FOR_ALL_ZONES(PGALLOC), | ||
33 | PGFREE, PGACTIVATE, PGDEACTIVATE, | ||
34 | PGFAULT, PGMAJFAULT, | ||
35 | FOR_ALL_ZONES(PGREFILL), | ||
36 | FOR_ALL_ZONES(PGSTEAL), | ||
37 | FOR_ALL_ZONES(PGSCAN_KSWAPD), | ||
38 | FOR_ALL_ZONES(PGSCAN_DIRECT), | ||
39 | #ifdef CONFIG_NUMA | ||
40 | PGSCAN_ZONE_RECLAIM_FAILED, | ||
41 | #endif | ||
42 | PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, | ||
43 | KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, | ||
44 | KSWAPD_SKIP_CONGESTION_WAIT, | ||
45 | PAGEOUTRUN, ALLOCSTALL, PGROTATED, | ||
46 | #ifdef CONFIG_COMPACTION | ||
47 | COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED, | ||
48 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, | ||
49 | #endif | ||
50 | #ifdef CONFIG_HUGETLB_PAGE | ||
51 | HTLB_BUDDY_PGALLOC, HTLB_BUDDY_PGALLOC_FAIL, | ||
52 | #endif | ||
53 | UNEVICTABLE_PGCULLED, /* culled to noreclaim list */ | ||
54 | UNEVICTABLE_PGSCANNED, /* scanned for reclaimability */ | ||
55 | UNEVICTABLE_PGRESCUED, /* rescued from noreclaim list */ | ||
56 | UNEVICTABLE_PGMLOCKED, | ||
57 | UNEVICTABLE_PGMUNLOCKED, | ||
58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | ||
59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | ||
60 | UNEVICTABLE_MLOCKFREED, | ||
61 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
62 | THP_FAULT_ALLOC, | ||
63 | THP_FAULT_FALLBACK, | ||
64 | THP_COLLAPSE_ALLOC, | ||
65 | THP_COLLAPSE_ALLOC_FAILED, | ||
66 | THP_SPLIT, | ||
67 | #endif | ||
68 | NR_VM_EVENT_ITEMS | ||
69 | }; | ||
70 | |||
71 | extern int sysctl_stat_interval; | 11 | extern int sysctl_stat_interval; |
72 | 12 | ||
73 | #ifdef CONFIG_VM_EVENT_COUNTERS | 13 | #ifdef CONFIG_VM_EVENT_COUNTERS |