diff options
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ca6ca92418a6..650ba2fb3301 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -140,25 +140,29 @@ enum lru_list { | |||
140 | NR_LRU_LISTS | 140 | NR_LRU_LISTS |
141 | }; | 141 | }; |
142 | 142 | ||
143 | #define for_each_lru(l) for (l = 0; l < NR_LRU_LISTS; l++) | 143 | #define for_each_lru(lru) for (lru = 0; lru < NR_LRU_LISTS; lru++) |
144 | 144 | ||
145 | #define for_each_evictable_lru(l) for (l = 0; l <= LRU_ACTIVE_FILE; l++) | 145 | #define for_each_evictable_lru(lru) for (lru = 0; lru <= LRU_ACTIVE_FILE; lru++) |
146 | 146 | ||
147 | static inline int is_file_lru(enum lru_list l) | 147 | static inline int is_file_lru(enum lru_list lru) |
148 | { | 148 | { |
149 | return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE); | 149 | return (lru == LRU_INACTIVE_FILE || lru == LRU_ACTIVE_FILE); |
150 | } | 150 | } |
151 | 151 | ||
152 | static inline int is_active_lru(enum lru_list l) | 152 | static inline int is_active_lru(enum lru_list lru) |
153 | { | 153 | { |
154 | return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE); | 154 | return (lru == LRU_ACTIVE_ANON || lru == LRU_ACTIVE_FILE); |
155 | } | 155 | } |
156 | 156 | ||
157 | static inline int is_unevictable_lru(enum lru_list l) | 157 | static inline int is_unevictable_lru(enum lru_list lru) |
158 | { | 158 | { |
159 | return (l == LRU_UNEVICTABLE); | 159 | return (lru == LRU_UNEVICTABLE); |
160 | } | 160 | } |
161 | 161 | ||
162 | struct lruvec { | ||
163 | struct list_head lists[NR_LRU_LISTS]; | ||
164 | }; | ||
165 | |||
162 | /* Mask used at gathering information at once (see memcontrol.c) */ | 166 | /* Mask used at gathering information at once (see memcontrol.c) */ |
163 | #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE)) | 167 | #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE)) |
164 | #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON)) | 168 | #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON)) |
@@ -173,6 +177,8 @@ static inline int is_unevictable_lru(enum lru_list l) | |||
173 | #define ISOLATE_CLEAN ((__force isolate_mode_t)0x4) | 177 | #define ISOLATE_CLEAN ((__force isolate_mode_t)0x4) |
174 | /* Isolate unmapped file */ | 178 | /* Isolate unmapped file */ |
175 | #define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x8) | 179 | #define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x8) |
180 | /* Isolate for asynchronous migration */ | ||
181 | #define ISOLATE_ASYNC_MIGRATE ((__force isolate_mode_t)0x10) | ||
176 | 182 | ||
177 | /* LRU Isolation modes. */ | 183 | /* LRU Isolation modes. */ |
178 | typedef unsigned __bitwise__ isolate_mode_t; | 184 | typedef unsigned __bitwise__ isolate_mode_t; |
@@ -364,10 +370,8 @@ struct zone { | |||
364 | ZONE_PADDING(_pad1_) | 370 | ZONE_PADDING(_pad1_) |
365 | 371 | ||
366 | /* Fields commonly accessed by the page reclaim scanner */ | 372 | /* Fields commonly accessed by the page reclaim scanner */ |
367 | spinlock_t lru_lock; | 373 | spinlock_t lru_lock; |
368 | struct zone_lru { | 374 | struct lruvec lruvec; |
369 | struct list_head list; | ||
370 | } lru[NR_LRU_LISTS]; | ||
371 | 375 | ||
372 | struct zone_reclaim_stat reclaim_stat; | 376 | struct zone_reclaim_stat reclaim_stat; |
373 | 377 | ||