diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9c5111f49a32..d1f60d5fe2ea 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -86,6 +86,11 @@ enum zone_stat_item { | |||
86 | NR_ACTIVE_ANON, /* " " " " " */ | 86 | NR_ACTIVE_ANON, /* " " " " " */ |
87 | NR_INACTIVE_FILE, /* " " " " " */ | 87 | NR_INACTIVE_FILE, /* " " " " " */ |
88 | NR_ACTIVE_FILE, /* " " " " " */ | 88 | NR_ACTIVE_FILE, /* " " " " " */ |
89 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
90 | NR_UNEVICTABLE, /* " " " " " */ | ||
91 | #else | ||
92 | NR_UNEVICTABLE = NR_ACTIVE_FILE, /* avoid compiler errors in dead code */ | ||
93 | #endif | ||
89 | NR_ANON_PAGES, /* Mapped anonymous pages */ | 94 | NR_ANON_PAGES, /* Mapped anonymous pages */ |
90 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. | 95 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. |
91 | only modified from process context */ | 96 | only modified from process context */ |
@@ -128,10 +133,18 @@ enum lru_list { | |||
128 | LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE, | 133 | LRU_ACTIVE_ANON = LRU_BASE + LRU_ACTIVE, |
129 | LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE, | 134 | LRU_INACTIVE_FILE = LRU_BASE + LRU_FILE, |
130 | LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE, | 135 | LRU_ACTIVE_FILE = LRU_BASE + LRU_FILE + LRU_ACTIVE, |
131 | NR_LRU_LISTS }; | 136 | #ifdef CONFIG_UNEVICTABLE_LRU |
137 | LRU_UNEVICTABLE, | ||
138 | #else | ||
139 | LRU_UNEVICTABLE = LRU_ACTIVE_FILE, /* avoid compiler errors in dead code */ | ||
140 | #endif | ||
141 | NR_LRU_LISTS | ||
142 | }; | ||
132 | 143 | ||
133 | #define for_each_lru(l) for (l = 0; l < NR_LRU_LISTS; l++) | 144 | #define for_each_lru(l) for (l = 0; l < NR_LRU_LISTS; l++) |
134 | 145 | ||
146 | #define for_each_evictable_lru(l) for (l = 0; l <= LRU_ACTIVE_FILE; l++) | ||
147 | |||
135 | static inline int is_file_lru(enum lru_list l) | 148 | static inline int is_file_lru(enum lru_list l) |
136 | { | 149 | { |
137 | return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE); | 150 | return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE); |
@@ -142,6 +155,15 @@ static inline int is_active_lru(enum lru_list l) | |||
142 | return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE); | 155 | return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE); |
143 | } | 156 | } |
144 | 157 | ||
158 | static inline int is_unevictable_lru(enum lru_list l) | ||
159 | { | ||
160 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
161 | return (l == LRU_UNEVICTABLE); | ||
162 | #else | ||
163 | return 0; | ||
164 | #endif | ||
165 | } | ||
166 | |||
145 | struct per_cpu_pages { | 167 | struct per_cpu_pages { |
146 | int count; /* number of pages in the list */ | 168 | int count; /* number of pages in the list */ |
147 | int high; /* high watermark, emptying needed */ | 169 | int high; /* high watermark, emptying needed */ |