diff options
Diffstat (limited to 'include/linux/swap.h')
-rw-r--r-- | include/linux/swap.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index 833be56ad835..7d09d79997a4 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -184,14 +184,24 @@ extern void swap_setup(void); | |||
184 | * lru_cache_add: add a page to the page lists | 184 | * lru_cache_add: add a page to the page lists |
185 | * @page: the page to add | 185 | * @page: the page to add |
186 | */ | 186 | */ |
187 | static inline void lru_cache_add(struct page *page) | 187 | static inline void lru_cache_add_anon(struct page *page) |
188 | { | 188 | { |
189 | __lru_cache_add(page, LRU_INACTIVE); | 189 | __lru_cache_add(page, LRU_INACTIVE_ANON); |
190 | } | 190 | } |
191 | 191 | ||
192 | static inline void lru_cache_add_active(struct page *page) | 192 | static inline void lru_cache_add_active_anon(struct page *page) |
193 | { | 193 | { |
194 | __lru_cache_add(page, LRU_ACTIVE); | 194 | __lru_cache_add(page, LRU_ACTIVE_ANON); |
195 | } | ||
196 | |||
197 | static inline void lru_cache_add_file(struct page *page) | ||
198 | { | ||
199 | __lru_cache_add(page, LRU_INACTIVE_FILE); | ||
200 | } | ||
201 | |||
202 | static inline void lru_cache_add_active_file(struct page *page) | ||
203 | { | ||
204 | __lru_cache_add(page, LRU_ACTIVE_FILE); | ||
195 | } | 205 | } |
196 | 206 | ||
197 | /* linux/mm/vmscan.c */ | 207 | /* linux/mm/vmscan.c */ |
@@ -199,7 +209,7 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | |||
199 | gfp_t gfp_mask); | 209 | gfp_t gfp_mask); |
200 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | 210 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, |
201 | gfp_t gfp_mask); | 211 | gfp_t gfp_mask); |
202 | extern int __isolate_lru_page(struct page *page, int mode); | 212 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
203 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 213 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
204 | extern int vm_swappiness; | 214 | extern int vm_swappiness; |
205 | extern int remove_mapping(struct address_space *mapping, struct page *page); | 215 | extern int remove_mapping(struct address_space *mapping, struct page *page); |