diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-05-26 19:25:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 20:12:34 -0400 |
commit | f042e707ee671e4beb5389abeb9a1819a2cf5532 (patch) | |
tree | 53164f281453db20bc2978ed6828f01d919f50db /include/linux/vmstat.h | |
parent | a77aea92010acf54ad785047234418d5d68772e2 (diff) |
mm: move enum vm_event_item into a standalone header file
enums are problematic because they cannot be forward-declared:
akpm2:/home/akpm> cat t.c
enum foo;
static inline void bar(enum foo f)
{
}
akpm2:/home/akpm> gcc -c t.c
t.c:4: error: parameter 1 ('f') has incomplete type
So move the enum's definition into a standalone header file which can be used
wherever its definition is needed.
Cc: Ying Han <yinghan@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/vmstat.h')
-rw-r--r-- | include/linux/vmstat.h | 62 |
1 files changed, 1 insertions, 61 deletions
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 |